Fixed initialization of non-transparent pixels (https://github.com/dlemstra/Magick...
authorDirk Lemstra <dirk@git.imagemagick.org>
Mon, 16 Apr 2018 21:36:23 +0000 (23:36 +0200)
committerDirk Lemstra <dirk@git.imagemagick.org>
Mon, 16 Apr 2018 21:36:23 +0000 (23:36 +0200)
coders/png.c

index b4568cc8708ee88de0c6b757707af9960e3e39c8..8d10585ab7d56fcf3bad25df4136a20fe8893e54 100644 (file)
@@ -3822,13 +3822,10 @@ static Image *ReadOnePNGImage(MngInfo *mng_info,
                 {
                   SetPixelAlpha(image,TransparentAlpha,q);
                 }
-
-#if 0 /* I have not found a case where this is needed. */
               else
                 {
-                  SetPixelAlpha(image,q)=(Quantum) OpaqueAlpha;
+                  SetPixelAlpha(image,OpaqueAlpha,q);
                 }
-#endif
 
               q+=GetPixelChannels(image);
             }