-
Notifications
You must be signed in to change notification settings - Fork 21
Description
This is part of the more broad #493 discussion.
A new chunk (named iEXt, "image extra") would be added to contain image-like data which doesn't fit PNG's existing RGB / grayscale (with alpha).
It will work exactly like IDAT except each chunk will start with an ID and it may have any number of channels above 0. For example, IDAT might store 1 (grayscale), 2 (grayscale + alpha), 3 (rgb), or 4 (rgb + alpha) channels of data. But iEXt could also store 5 or more.
Currently, the spec requires that all IDAT chunks be contiguous. But some of the extra image data should be interleaved within the IDAT data. We need to investigate if breaking this requirement is problematic.
An example of interleaving IDAT and iEXt is gain maps. It would be bad to display image data while it is being downloaded only to later encounter the gain map data and correct the display. This would flash the user. Interleaving the gain map data would allow only a small delay on the current image piece's display while the next bit of gain map data is downloaded.