From: dirk Date: Tue, 6 Sep 2016 19:48:43 +0000 (+0200) Subject: Corrected location of where the mask is drawn. X-Git-Tag: 7.0.3-1~35 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3b5f08c694943eb64c9491e5e68b35496da62d48;p=imagemagick Corrected location of where the mask is drawn. --- diff --git a/coders/psd.c b/coders/psd.c index 1591cf21a..019a19f20 100644 --- a/coders/psd.c +++ b/coders/psd.c @@ -1180,7 +1180,7 @@ static MagickBooleanType ReadPSDChannel(Image *image,const PSDInfo *psd_info, Ignore mask that is not a user supplied layer mask, if the mask is disabled or if the flags have unsupported values. */ - if (layer_info->channel_info[channel].type != -2 || + if ((layer_info->channel_info[channel].type != -2) || (layer_info->mask.flags > 3) || (layer_info->mask.flags & 0x02)) { SeekBlob(image,layer_info->channel_info[channel].size-2,SEEK_CUR); @@ -1338,7 +1338,8 @@ static MagickBooleanType ReadPSDLayer(Image *image,const PSDInfo *psd_info, if ((status != MagickFalse) && (layer_info->mask.image != (Image *) NULL)) { status=CompositeImage(layer_info->image,layer_info->mask.image, - CopyAlphaCompositeOp,MagickTrue,0,0,exception); + CopyAlphaCompositeOp,MagickTrue,layer_info->mask.page.x, + layer_info->mask.page.y,exception); layer_info->mask.image=DestroyImage(layer_info->mask.image); }