]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorglennrp <glennrp@git.imagemagick.org>
Thu, 17 Mar 2011 13:24:10 +0000 (13:24 +0000)
committerglennrp <glennrp@git.imagemagick.org>
Thu, 17 Mar 2011 13:24:10 +0000 (13:24 +0000)
coders/png.c

index 97744c497d3618b559765d94df820f016e949813..e4b12e837e670129a55a0ff785a322b854cd7c58 100644 (file)
@@ -9327,6 +9327,12 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info,
 
                 if (ping_color_type == PNG_COLOR_TYPE_GRAY)
                   {
+                    /* To do:
+                     *
+                     * This is failing to account for 2 and 4-bit depths
+                     * The call to png_set_packing() above is supposed to
+                     * take care of those.
+                     */
 #if LOW_DEPTH_OK==1
                     quantum_info->depth=ping_bit_depth;
 #endif
@@ -9347,26 +9353,13 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info,
 
                 else
                   {
-                    /* To do:
-                     *
-                     * This is failing to account for 1, 2, 4-bit depths
-                     * The call to png_set_packing() above is supposed to
-                     * take care of those.
-                     */
-#if LOW_DEPTH_OK==1
-                    quantum_info->depth=ping_bit_depth;
-                    /* GrayQuantum does not work here */
-                    (void) ExportQuantumPixels(image,(const CacheView *) NULL,
-                      quantum_info,GrayQuantum,ping_pixels,&image->exception);
-#else
                     (void) ExportQuantumPixels(image,(const CacheView *) NULL,
                       quantum_info,IndexQuantum,ping_pixels,&image->exception);
-#endif
 
                     if (logging != MagickFalse && y <= 2)
                     {
                       (void) LogMagickEvent(CoderEvent,GetMagickModule(),
-                          "  Writing row of pixels (4)");
+                          "  Writing row of non-gray pixels (4)");
 
                       (void) LogMagickEvent(CoderEvent,GetMagickModule(),
                           "  ping_pixels[0]=%d,ping_pixels[1]=%d",