The libmng homepage The libmng community on SourceForge The official MNG homepage The official PNG homepage

<< prev

index

next >>

The following samples test various formats of PROM/MAGN & PAST chunk handling.

The first row of samples show the use of PROM, MAGN & PAST. All three should look identical. The first is a PNG reference image, the second & third are MNG samples that use a small embedded 10x1 indexed PNG image with cheap transparency (a fully opaque to fully transparent ramp), 'PROM'ote it to 8- and 16-bit respectively, then 'MAGN'ify it to 19x120 pixels (lineair interpolation in X direction and replication in Y direction) and finally 'PAST'e it onto an object created from a BASI-IEND sequence with 25% opaque red pixels. The 'BACK'ground is solid white, so you should see alternating stripes of white fading to soft-red fading to white again. The paste operations alternately use orientation 0 and 4.

If the samples do not match your MNG decoder does not peroprly handle either the PROM, MAGN or PAST operation. Check for PROM errors with the PROM samples. The delta-image samples also make use of MAGN, so checking with those will determine if MAGN or PAST are not handled correctly.

Note that implementations using libmng 1.0.4 or earlier will not work correctly!



MNGPAST8a.mng


MNGPAST16a.mng

The following sets show more use of the PAST chunk. Here, several images from the PNGsuite are 'PAST'ed with compose over/replace and compose under onto a destination object that was first created with a PAST operation with orientation = 8. This first 'PAST'e uses an internal object created in the same manner as above from the 10x1 PNG image.

The first sample of each set of two is a PNG reference image. The second is the actual MNG sample. The first set is based on 8-bit operation and the second set on 16-bit.

The first row in each sample is created with PAST composition = 0 and orientation = 2, the second, composition = 1 and orientation = 4 and the third with composition = 2 and orientation = 6.



MNGPAST8b.mng


MNGPAST16b.mng

Some or all of the following images were used:

basn6a16 & basi6a16 - 3x16 bits rgb color + 16 bit alpha-channel
basn6a08 & basi6a08 - 3x8 bits rgb color + 8 bit alpha-channel
basn4a16 & basi4a16 - 16 bit grayscale + 16 bit alpha-channel
basn4a08 & basi4a08 - 8 bit grayscale + 8 bit alpha-channel
basn3p08 & basi3p08 - 8 bit (256 color) paletted
basn3p04 & basi3p04 - 4 bit (16 color) paletted
basn3p02 & basi3p02 - 2 bit (4 color) paletted
basn3p01 & basi3p01 - 1 bit (2 color) paletted
basn2c16 & basi2c16 - 3x16 bits rgb color
basn2c08 & basi2c08 - 3x8 bits rgb color
basn0g16 & basi0g16 - 16 bit (64k level) grayscale
basn0g08 & basi0g08 - 8 bit (256 level) grayscale
basn0g04 & basi0g04 - 4 bit (16 level) grayscale
basn0g02 & basi0g02 - 2 bit (4 level) grayscale
basn0g01 & basi0g01 - black & white




Samples & images on this page are Copyright © G. Juyn


<< prev

index

next >>