]> granicus.if.org Git - imagemagick/commitdiff
Fixed reading 1-bit PSD file (https://github.com/ImageMagick/ImageMagick/issues/141)
authordirk <dirk@git.imagemagick.org>
Fri, 26 Feb 2016 08:54:06 +0000 (09:54 +0100)
committerdirk <dirk@git.imagemagick.org>
Fri, 26 Feb 2016 08:55:24 +0000 (09:55 +0100)
coders/psd.c

index ab510b865d6faf39152ba56e86a3dd8ee2e04632..85fdacb13e0c30a7a6c044b5395995c395d0c243 100644 (file)
@@ -883,7 +883,7 @@ static MagickBooleanType ReadPSDChannelPixels(Image *image,
         for (bit = 0; bit < number_bits; bit++)
         {
           SetPSDPixel(image,channels,type,packet_size,(((unsigned char) pixel)
-            & (0x01 << (7-bit))) != 0 ? 0 : 255,q,exception);
+            & (0x01 << (7-bit))) != 0 ? 0 : QuantumRange,q,exception);
           q+=GetPixelChannels(image);
           x++;
         }