| Description of the Stereoscopic .PNG Image File Format (stER chunk) | |||
|
Note: The sTER chunk specifications are presently debated in the png-list mailing list. The last update on this page has been done on 2004-Nov-19. The previous page has been renamed stereo_png_format_definition_copy(1).html. NOTE: To clearly understand the topics covered on this page, you must have a good knowledge of the .PNG file format. You can find all the information about .PNG file format on the official Website (www.libpng.org). Having some knowledge about how a stereoscopic image works is also a good start. It is the presence of the sTER chunk that indicates that the image is stereoscopic. The data portion of the stereoscopic sTER chunk consists of an unsigned 8 bits integer that contains the stereoscopic image type. Up to now, since no type value has been yet defined, the stereoscopic image type value must always be initialized to 0. However, numbers greater than 127 (128 to 255) are allowed for inventing experimental or private definitions of values. (Note that use of private type codes may render a file unreadable by standard decoders. Such codes are strongly discouraged except for experimental purposes, and should not appear in publicly available software or files.) It is more the way that the left and right images are stored than the chunk itself that makes the .PNG image a stereoscopic image. The rules are very easy. The .PNG image is composed of two images. One for the right eye and one for the left eye. Right and left images must have the same size. Samples of right and left images are co-sited. The two images are stored side by side horizontally with sometimes some padding pixels between them. Right image come first (right image is at left of left image). The horizontal start position of left image must always begin on a multiple of 8 pixels (in order to sync the Progressive Display of the two images). You must use the pHYs chunk to indicate the pixels size ratio when it is not 1:1. An example will help understanding the way a stereoscopic image of 77x53 pixels is saved like a normal image of 157x53 pixels. - Right and left images are 77x53 pixels.
IMPORTANT: Even if the padding pixels are never displayed, their values must always be valid because an application, not supporting the sTER chunk, will display the complete image with the padding pixels. (The only dangerous case is the color palette case with less entries in the palette than the bit depth can produces.) In the example above, we are using grayscale padding pixels only to make the padding region more obvious to see. The reason to put right image at left and left image at right is simply because the Cross-Eyed Display Technique is more flexible than the Parallel Eyes Display Technique. The Parallel Eyes Display Technique limits the distance (so the size of images) between right and left center of images on screen to be less than the distance between your eyes. By example, the Parallel Eyes Display Technique used on a Web page can work well on a 17" monitor but not on a 19" monitor (unless you can move your eye globes in opposite direction without been injured!). The Cross-Eyed Display Technique does not have this limitation and works 100% of the time. Applications, those do not yet support the sTER chunk, will simply display an image composed of a right image followed by a left image with sometimes some padding pixels between them. In such applications, you will still be able to view the stereoscopic image by using the Cross-Eyed Viewing technique, since the storing format of the right/left images follows the rules of the Cross-Eyed Display Technique.
DECODER EXAMPLE : As you can see, adding support to Stereoscopic
.PNG Image File Format is a piece of cake if your application already
support .PNG Image File Format. |
||||||||||||||||||||||||||||||||||||||||||||||