Changeset 3818 for ImageMagick/trunk/coders/png.c
- Timestamp:
- 03/07/11 12:40:17 (2 years ago)
- File:
-
- 1 edited
-
ImageMagick/trunk/coders/png.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ImageMagick/trunk/coders/png.c
r3817 r3818 8304 8304 } 8305 8305 8306 #if 1 /* To do: Enable this when low bit-depth grayscale is working */8307 8306 else if (ping_color_type == 8308 8307 PNG_COLOR_TYPE_GRAY && image_colors < 17 && 8309 8308 mng_info->IsPalette) 8310 8309 { 8311 8312 8310 /* Check if grayscale is reducible */ 8311 8312 #define LOW_DEPTH_OK 0 /* To do: eliminate this when low bit-depths work */ 8313 8313 int 8314 #if LOW_DEPTH_OK==1 8314 8315 depth_4_ok=MagickTrue, 8315 8316 depth_2_ok=MagickTrue, 8317 #endif 8316 8318 depth_1_ok=MagickTrue; 8317 8319 … … 8323 8325 intensity=ScaleQuantumToChar(image->colormap[i].red); 8324 8326 8327 #if LOW_DEPTH_OK==1 8325 8328 if ((intensity & 0x0f) != ((intensity & 0xf0) >> 4)) 8326 8329 depth_4_ok=depth_2_ok=depth_1_ok=MagickFalse; 8327 8328 8330 else if ((intensity & 0x03) != ((intensity & 0x0c) >> 2)) 8329 8331 depth_2_ok=depth_1_ok=MagickFalse; 8330 8331 else if ((intensity & 0x01) != ((intensity & 0x02) >> 1)) 8332 else 8333 #endif 8334 if ((intensity & 0x01) != ((intensity & 0x02) >> 1)) 8332 8335 depth_1_ok=MagickFalse; 8333 (void) depth_4_ok;8334 8336 } 8335 8337 … … 8337 8339 ping_bit_depth=1; 8338 8340 8339 #if 0 /* To do: Enable this when bit depths 2 and 4 are working. */8341 #if LOW_DEPTH_OK==1 8340 8342 else if (depth_2_ok && mng_info->write_png_depth <= 2) 8341 8343 ping_bit_depth=2; … … 8345 8347 #endif 8346 8348 } 8347 #endif /* 1 */8348 8349 } 8349 8350
Note: See TracChangeset
for help on using the changeset viewer.
