The rest of the Third Edition’s ancillary chunks: the size of a pixel, the last change, embedded camera data, and two chunks about the palette.
pHYs, physical pixel size
| Offset | Size | Field | Meaning |
|---|---|---|---|
| 0 | 4 | Pixels per unit, X | |
| 4 | 4 | Pixels per unit, Y | |
| 8 | 1 | Unit | 0 not given, so the two numbers only give the aspect ratio; 1 the metre. |
Without it, pixels are square and of no particular size. 2835 pixels per metre is about 72 dpi.
tIME, last modification time
When the image data was last changed, in UTC, written automatically, not the time the picture was created (which belongs in a Creation Time text chunk).
| Offset | Size | Field | Range |
|---|---|---|---|
| 0 | 2 | Year | The full year, such as 2024 |
| 2 | 1 | Month | 1 to 12 |
| 3 | 1 | Day | 1 to 31 |
| 4 | 1 | Hour | 0 to 23 |
| 5 | 1 | Minute | 0 to 59 |
| 6 | 1 | Second | 0 to 60, allowing a leap second |
eXIf, Exif data
An Exif profile, as digital cameras write in JPEG, without JPEG’s APP1 marker, length and
Exif identifier. The chunk’s data is a TIFF structure: its first four bytes must be
49 49 2A 00 (little-endian) or 4D 4D 00 2A (big-endian), and it may be up to 231 − 1 bytes. There may be only one eXIf chunk, before the image data. The explorer reads its tags with the same reader it uses
for TIFF and JPEG Exif.
The data should be treated as historical unless a reader knows otherwise: the picture may have been edited since the Exif was written.
hIST, palette histogram
A series of 2-byte numbers, one for each palette entry in order, giving roughly how often each colour is used. It needs a PLTE, and must follow it. Zero means the colour is unused; any colour a pixel uses must be non-zero. The scale is the encoder’s choice.
| Offset | Size | Field |
|---|---|---|
| 0 | 2 | Frequency of entry 0 |
| 2 … | 2 each | Frequencies of the further entries |
sPLT, suggested palette
A palette recommended for showing the image on a device with few colours. Several may appear, each with a different name.
| Field | Size | Meaning |
|---|---|---|
| Palette name | 1 to 79 bytes | The same rules as a keyword. |
| Null separator | 1 | |
| Sample depth | 1 | 8 or 16. |
| Entries | The rest | Filling the chunk, so the count is the size left over divided by 6 or 10. |
| Field | Size at depth 8 | Size at depth 16 |
|---|---|---|
| Red, green, blue, alpha | 1 each | 2 each |
| Frequency | 2 | 2 |
Alpha is not premultiplied: 0 is transparent and the largest value opaque. Entries must be in decreasing order of frequency.