Re: MNG/JNG specification updates
Adeluc <png-8CwYj0sA/[email protected]>
| Newsgroups | gmane.comp.graphics.png.general |
|---|---|
| Organization | Adeluc |
| Message-ID | <F55B4B74DFB64FADA717DBF996C14106@HPP72600MHZ> |
> Version 0.94.9 of the APG format that I'm working on addresses sTER. > It allows the PNG sTER-type modes plus it allows pairs of separate > images to be identified as stereo pairs. I wasn't aware of JPS until > now; I think we did discuss allowing over-under pairs and interlaced > pairs during the sTER chunk discussions, but if so they did not make > it into our sTER chunk spec. The reason sTER had its two images side by side was to give a chance to a viewer to see the stereoscopic image even if he used a software unaware of the sTER chunk by using the cross eye technique (or parallel technique). The reason sTER did not interleave the two images is the same why padding is added to make the rightmost image starting on a multiple of 8 pixels: Pixels synchronization of the two images during decompression when Adams interlace is active. If you decide that JNG also support stereoscopic image, to help you decide if the “_JPSJPS_” APP3 descriptor should be supported or if only the sTER chunk is enough, I suggest you to ask yourself what is a JNG file. Is it a JPG file with an alpha channel? Or is it a PNG file with a lossy but highly compression? My opinion is that if you think of JNG as a PNG file, you should simply ignore the complicated “_JPSJPS_” APP3 descriptor and simply support the sTER chunk. The reason why the “_JPSJPS_” APP3 descriptor was supporting all kind of storage formats was to be able to have all your JPS files stored in a specific format ready to use by some specific hardware or game without the need to compute from the two separated images a stereo image in an appropriated displayable format. Todays computer speed make this need a really low priority. Also, considering the compression algorithm used by JPG, storing a stereo image in JPS_SD_LAYOUT_INTERLEAVED or JPS_SD_LAYOUT_ANAGLYPH will create a lot of pixel/color artifacts. Finally, JPS_SD_LAYOUT_ANAGLYPH requires two alpha channels. Looks like a lot of fun and complications ahead! Unless you decide to only support sTER. Assumptions from the “JPS Specifications.pdf” (page 5 of 6): If a JPEG file is thought to contain a stereo image, but a stereoscopic descriptor is not present, an application should assume the layout of the stereo image to be: Side-by-Side, Full Height, Right Field First, no pixel padding between the two images. That means you can create a JPS file from any paint software. Save your stereo image as a JPG file then rename its extension to JPS. Jean-Claude Hébert Adeluc ------------------------------------------------------------------------------ _______________________________________________ png-mng-misc mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/png-mng-misc