0

Can a PNG file's data be loaded in a certain order, say beginning with one RGBA channel, then the rest?

Perhaps similar to how JPG files can, sometimes using custom codecs, store their data as "scans" or "slices", that are loaded progressively, sequentially or interleaved, at first displaying black and white, followed by red, green, and finally blue.

It seems very unlikely, but can PNG files have a way of behaving like this?

References:

carré
  • 3
  • 1
  • 1

1 Answers1

0

PNG's equivalent to JPEG's progressive display is interlacing. Rather than interlacing lines, it interlaces pixels using a pattern the PNG standard calls ADAM7.

user3344003
  • 20,574
  • 3
  • 26
  • 62
  • And I assume there is no way with normal PNG standards to set one color channel, or indexed color even, to load before others then. Makes sense. – carré Feb 27 '19 at 17:06
  • In theory, you could rescan the stream and only hunt for the channels you want but that would be high inefficient. Plus, displaying by color would produce odd effects on the screen. – user3344003 Feb 27 '19 at 17:15