]> granicus.if.org Git - imagemagick/commitdiff
Ignore user supplied layer mask.
authordirk <dirk@git.imagemagick.org>
Thu, 16 Jan 2014 18:31:58 +0000 (18:31 +0000)
committerdirk <dirk@git.imagemagick.org>
Thu, 16 Jan 2014 18:31:58 +0000 (18:31 +0000)
coders/psd.c

index 5c07c3db8457770b7b7921c7832ab3ffa9962526..f88cce6a0af4a8fe554d582fdbbc9a21a10a738a 100644 (file)
@@ -912,7 +912,7 @@ static MagickStatusType ReadPSDChannelZip(Image *image,
 
   if (image->debug != MagickFalse)
     (void) LogMagickEvent(CoderEvent,GetMagickModule(),
-       "      layer data is RLE compressed");
+       "      layer data is ZIP compressed");
 
   compact_pixels=(unsigned char *) AcquireQuantumMemory(compact_size,
     sizeof(*compact_pixels));
@@ -1016,6 +1016,13 @@ static MagickStatusType ReadPSDChannel(Image *image,PSDInfo *psd_info,
   MagickStatusType
     status;
 
+  if (layer_info->channel_info[channel].type < -1)
+  {
+    /* ignore user supplied layer mask */
+    SeekBlob(image,layer_info->channel_info[channel].size-2,SEEK_CUR);
+    return(MagickTrue);
+  }
+
   offset=TellBlob(image);
   status=MagickTrue;
   switch(compression)