The PNG Guide is an eBook based on Greg Roelofs' book, originally published by O'Reilly.



Image Offset (oFFs)

  • Status:   officially registered (PNG Extensions)
  • Location:   before first IDAT
  • Multiple:   no

For images that are available separately but envisioned as part of a greater whole, the image-offset chunk, oFFs, can be used to specify the absolute positioning of each. The most common example is positioning on a printed page, especially in conjunction with the pHYs chunk.

The layout of the chunk is given in Table 11-6.

Table 11-6. oFFs Chunk

Field Length and Valid Range
Image position, x axis 4 bytes (-2,147,483,647 to +2,147,483,647)
Image position, y axis 4 bytes (-2,147,483,647 to +2,147,483,647)
Unit specifier 1 byte (0, 1)

Valid units are either pixels (unit specifier = 0) or microns[90] (unit specifier = 1). The image position is measured from the top and left edges of the page (whether real or virtual); an image that is intended to be partly cut off may have negative offsets.

[90] Microns are more properly known as micrometers (μm); there are one million of them in a meter, or 25,400 in an inch.




Last Update: 2010-Nov-26