From 3b5f08c694943eb64c9491e5e68b35496da62d48 Mon Sep 17 00:00:00 2001 From: dirk Date: Tue, 6 Sep 2016 21:48:43 +0200 Subject: [PATCH] Corrected location of where the mask is drawn. --- coders/psd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); } -- 2.50.1