Comments on this document can be sent to the PNG specification maintainers at
Distribution of this memo is unlimited.
At present, the latest version of this document is available on the World Wide Web from
Permission is granted to copy and distribute this document for any purpose and without charge, provided that the copyright notice and this notice are preserved, and that any substantive changes or deletions from the original are clearly marked.
It is proposed to add the following section to the document "Extensions to the PNG 1.2 Specification, Version 1.2.0"
When present, the sTER chunk indicates that the datastream contains a stereo pair of subimages within a single PNG image.
The sTER chunk contains:
Mode: 1 byte 0: cross-fuse layout 1: diverging-fuse layout
The sTER chunk with mode==0 indicates that the datastream contains two subimages, encoded within a single PNG image. They are arranged side-by-side, with one subimage intended for presentation to the right eye and the other subimage intended for presentation to the left eye. The left edge of the right subimage must be on a column that is evenly divisible by eight, so that if interlacing is employed the two images will have coordinated interlacing. Padding columns between the two subimages must be introduced by the encoder if necessary. The two subimages must have the same dimensions after removal of any padding.
When mode==0, the right-eye image appears at the left and the left-eye image appears at the right, suitable for cross-eyed free viewing. When mode==1, the left-eye image appears at the left and the right-eye image appears at the right, suitable for divergent (wall-eyed) free viewing.
Decoders that are aware of the sTER chunk may display the two images in any suitable manner. Decoders that are not aware of the sTER chunk, and those that recognize the chunk but choose not to treat stereo pairs differently from regular PNG images, will naturally display them side-by-side in a manner suitable for free viewing.
If present, the sTER chunk must appear before the first IDAT chunk.
In palette images, for compatibility with software not supporting the sTER chunk, the padding pixels must be valid palette indices.
Given two subimages with width subimage_width, encoders can calculate the inter-subimage padding and total width W using the following pseudocode:
padding := 7 - ((subimage_width - 1) mod 8) W := 2 * subimage_width + padding
Given an image with width W, decoders can calculate the subimage width and inter-subimage padding using the following pseudocode:
padding := 15 - ((W - 1) mod 16) if (padding > 7) then error subimage_width := (W - padding) / 2
Decoders can assume that the samples in the left and right subimages are cosited, such that the subimages and their centers are coincident at the projection plane. Decoders can also assume that the left and right subimages are intended to be presented directly to the right and left eyes of the user/viewer without independent scaling, rotation or displacement. I.e., the subimages will be presented at the same size in the same relative position and orientation to each eye of the viewer.
Encoders should use the pHYs chunk to indicate the pixel's size ratio when it is not 1:1.
It is recommended that encoders use the cross-fusing layout (mode==0), especially when the image separation is more than 65 millimeters.
It is proposed to add the following paragraphs to the document "MNG (Multiple-image Network Graphics) Format, Version 1.0":
At the end of the list in Paragraph 4.2.3, IHDR, PNG chunks, IEND, add another bullet:
At the end of Paragraph 4.6, Ancillary PNG chunks, add another bullet:
Encoders should use the pHYg chunk or the MAGN chunk to indicate the pixel's size ratio when it is not 1:1.
In paragraph 5.2, Ancillary JNG chunks, after the word "sCAL", add ", sTER".
Add paragraph 10.8, Interlacing and the sTER chunk
It is recommended that when the sTER chunk is active and the two images are conveyed in separate PNG or JNG datastreams, interlacing not be used.