It is proposed to replace paragraph 4.2.3 with the following, which adds four filter types for embedded PNG datatreams. 4.2.3. IHDR, PNG chunks, IEND A PNG (Portable Network Graphics) datastream. See the PNG specification [PNG] and the Extensions to the PNG Specification document [PNG-EXT] for the format of the PNG chunks. The IHDR and IEND chunks and any chunks between them are written and decoded according to the PNG specification, except as extended in this section. These extensions do not apply to standalone PNG datastreams that have the PNG signature, but only to PNG datastreams that are embedded in a MNG datastream that begins with a MNG signature and the MHDR chunk. * If a global PLTE chunk appears in the top-level MNG datastream, the PNG datastream can have an empty PLTE chunk, to direct that the global PLTE and tRNS data be used. If an empty PLTE chunk is not present, the data is not inherited. MNG applications that recreate PNG files must write the global PLTE chunk rather than the empty one in the output PNG file, along with the global tRNS data if it is present. The global tRNS data can be subsequently overridden by a tRNS chunk in the PNG datastream. It is an error for the PNG datastream to contain an empty PLTE chunk when the global PLTE chunk is not present or has been nullified. * Additional PNG filter methods are defined: 1: Implicit "none" filtering of every scanline; filter bytes are omitted from the compressed datastream in the IDAT chunk(s). 32: Adaptive filtering with five basic types and intrapixel differencing. The leveling is implicitly (0,0,0,0). [or (132,0,132,0)?] 48: Adaptive filtering with five basic types, intrapixel differencing, and leveling. A set of level samples appears immediately prior to the filter byte for the first scanline in the IDAT chunk. 64: Adaptive filtering with five basic types and leveling, but without intrapixel differencing. This transformation, which is a modification of a method previously used in the LOCO image format [LOCO], is S0 = Red - Green - Red_level (for color_type 2 or 6) or Index - Index_level (for color_type 3) or Gray - Gray_level (for color_type 0 or 4) S1 = Green - Green_level (for color_type 2 or 6) or Alpha - Alpha_level (for color_type 4) S2 = Blue - Green - Blue_level (for color_type 2 or 6) S4 = Alpha - Alpha_level (for color_type 6) The transformation is done in integer arithmetic in sufficient precision to hold intermediate results, and the result is stored modulo the sample depth. Intrapixel differencing (subtracting the green sample) is only done for color types 2 and 6, and only when the filter method is 32 or 48. When the filter type is 48 or 64, the level values are inserted at the beginning of the compressed datastream contained in the IDAT chunk, immediately ahead of the first filter byte for the first row of pixels. WHen the filter type is 32, the level values are not included in the IDAT chunk and are implicitly all zero. [Experiments with putting a separate level set ahead of each filter byte have not been promising; the savings in filesize was offset by the extra storage for the level sets.] The level set contains 16-bit samples if the image sample depth is 16, otherwise it contains 8-bit samples. In indexed-color images, the level is applied to the raw palette index, not to the decoded colors. When the sample depth is less than 8, it is not an error for the level to be greater than 127; the modulo arithmetic will simply ignore the most significant bits. In tests, the set (132, 0, 132) has worked well with a large set of truecolor images. [should this be the default set, instead of (0,0,0,0)?] It has been demonstrated to improve the compressibility of natural images by 10 to 15 percent of the compressibility of RGB data. This seems to be due to the intrapixel correlation between color samples, which is ignored by the PNG filters. The RGB samples are recovered, after undoing the basic filtering, by the inverse of the transformation, which for RGBA images is Green = S1 + Green_level Red = S0 + Red_level + Green Blue = S2 + Blue_level + Green Alpha = S4 + Alpha_level As in the forward transformation, the inverse transformation is done in integer arithmetic in sufficient precision to hold intermediate results, and the result taken modulo the sample depth. Applications that convert a MNG datastream to a series of PNG datastreams must convert any PNG datastream with one of the additional filter methods to a standard PNG datastream with a PNG filter method (currently 0 is the only valid filter method). It is suggested that encoders write a "nEED MNG-1.0" chunk if they use this feature, for the benefit of pre-MNG-1.0 decoders. Applications must not write independent PNG datastreams (with either the .png or .mng file extension) with these new filter methods, unless they should become officially approved for use in PNG datastreams. For experimenting and testing, applications can use a value greater than 128 for this purpose, as permitted in the PNG specification. [There are no proposed changes in the remainder of this section]