comparison dwt/internal/image/PngPlteChunk.d @ 259:c0d810de7093

Update SWT 3.4M7 to 3.4
author Frank Benoit <benoit@tionex.de>
date Sun, 29 Jun 2008 14:33:38 +0200
parents ce446666f5a2
children
comparison
equal deleted inserted replaced
257:cc1d3de0e80b 259:c0d810de7093
110 // Note: just ignore the palette. 110 // Note: just ignore the palette.
111 // if (!headerChunk.getCanHavePalette()) DWT.error(DWT.ERROR_INVALID_IMAGE); 111 // if (!headerChunk.getCanHavePalette()) DWT.error(DWT.ERROR_INVALID_IMAGE);
112 112
113 // Palette chunks' data fields must be event multiples 113 // Palette chunks' data fields must be event multiples
114 // of 3. Each 3-byte group represents an RGB value. 114 // of 3. Each 3-byte group represents an RGB value.
115 if (getLength() % 3 !is 0) DWT.error(DWT.ERROR_INVALID_IMAGE); 115 if (getLength() % 3 !is 0) DWT.error(DWT.ERROR_INVALID_IMAGE);
116 116
117 // Palettes cannot have more entries than 2^bitDepth 117 // Palettes cannot have more entries than 2^bitDepth
118 // where bitDepth is the bit depth of the image given 118 // where bitDepth is the bit depth of the image given
119 // in the IHDR chunk. 119 // in the IHDR chunk.
120 if (1 << headerChunk.getBitDepth() < paletteSize) { 120 if (1 << headerChunk.getBitDepth() < paletteSize) {