]> granicus.if.org Git - imagemagick/commitdiff
https://github.com/ImageMagick/ImageMagick/issues/702
authorCristy <urban-warrior@imagemagick.org>
Wed, 30 Aug 2017 01:03:16 +0000 (21:03 -0400)
committerCristy <urban-warrior@imagemagick.org>
Wed, 30 Aug 2017 01:03:16 +0000 (21:03 -0400)
coders/png.c

index 99b83225fb213aa9b268213f4169e9dacc8f466b..a35b7746720e320afaf25281f7e2474414f0a422 100644 (file)
@@ -3261,25 +3261,6 @@ static Image *ReadOnePNGImage(MngInfo *mng_info,
             image->colormap[i].blue=0;
           }
         }
-
-      else
-        {
-          Quantum
-            scale;
-
-          scale = (Quantum) (65535.0/((1UL << ping_file_depth)-1.0));
-
-#if (MAGICKCORE_QUANTUM_DEPTH > 16)
-          scale = ScaleShortToQuantum(scale);
-#endif
-
-          for (i=0; i < (ssize_t) image->colors; i++)
-          {
-            image->colormap[i].red=(Quantum) (i*scale);
-            image->colormap[i].green=(Quantum) (i*scale);
-            image->colormap[i].blue=(Quantum) (i*scale);
-          }
-       }
     }
 
    /* Set some properties for reporting by "identify" */
@@ -3660,6 +3641,9 @@ static Image *ReadOnePNGImage(MngInfo *mng_info,
             break;
         }
 
+        if (SyncAuthenticPixels(image,exception) == MagickFalse)
+          break;
+
         /*
           Transfer image scanline.
         */