]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Mon, 30 May 2011 00:46:40 +0000 (00:46 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Mon, 30 May 2011 00:46:40 +0000 (00:46 +0000)
coders/bmp.c

index 3ba48b15765cef0bbcb105fa30b532b6b0f865a7..57e634b25294af8db15a2548839eb8867ac2201b 100644 (file)
@@ -1166,8 +1166,8 @@ static Image *ReadBMPImage(const ImageInfo *image_info,ExceptionInfo *exception)
             SetBluePixelComponent(q,ScaleShortToQuantum((unsigned short) blue));
             SetOpacityPixelComponent(q,OpaqueOpacity);
             if (image->matte != MagickFalse)
-              SetOpacityPixelComponent(q,ScaleShortToQuantum((unsigned short)
-                (65535-opacity)));
+              SetAlphaPixelComponent(q,ScaleShortToQuantum((unsigned short)
+                opacity));
             q++;
           }
           if (SyncAuthenticPixels(image,exception) == MagickFalse)
@@ -1262,7 +1262,8 @@ static Image *ReadBMPImage(const ImageInfo *image_info,ExceptionInfo *exception)
             SetBluePixelComponent(q,ScaleShortToQuantum((unsigned short) blue));
             SetOpacityPixelComponent(q,OpaqueOpacity);
             if (image->matte != MagickFalse)
-              q->opacity=ScaleShortToQuantum((unsigned short) (65535-opacity));
+              SetAlphaPixelComponent(q,ScaleShortToQuantum((unsigned short)
+                opacity));
             q++;
           }
           if (SyncAuthenticPixels(image,exception) == MagickFalse)