PNG opens in a browser but imports scrambled? Check Adam7
Compare interlaced and non-interlaced PNGs with identical pixels to isolate Adam7 support in a custom importer.


A PNG can display correctly in a browser and produce displaced rows in a custom game importer. Compare the interlace method using the same source pixels. This fixture targets a decoder or import wrapper you control.
Build two files with a verifiable result
- Create a 17-by-13 RGBA image. Give each row a distinct color and put a different marker in each corner. Export it twice with one Adam7-capable encoder, changing only the interlace option.
- Read the Interlace method field at the end of
IHDR. Zero is non-interlaced; one selects Adam7. Decode both through a reference decoder into the same RGBA representation and compare pixels. The completed images should match. - Import both into the target pipeline. If only method one fails, check whether the decoder treats the decompressed data as ordinary full-width image rows. Adam7 transmits seven reduced images; the implementation must reconstruct their sample locations and apply row filtering within the relevant pass.
Act on the failing stage
If both variants fail, investigate decompression, filtering and color-type support. If the target currently cannot read Adam7, explicitly export non-interlaced deliverables at build time and retain the master. Compare sizes with Resource Compressor, then verify the actual output format and header again. Changing the header byte alone cannot turn interlaced pixel data into normal scanlines.
Ready to try "PNG opens in a browser but imports scrambled? Check Adam7"?
Use our online tools to apply this tutorial to your indie game project right away.
