From d32352f8e5b132fb7989e81c96479e7a54951007 Mon Sep 17 00:00:00 2001 From: Cristy Date: Thu, 24 Jan 2019 20:13:24 -0500 Subject: [PATCH] https://imagemagick.org/discourse-server/viewtopic.php?f=3&t=35386 --- coders/tiff.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/coders/tiff.c b/coders/tiff.c index 0c423fbcb..ef33e4cf5 100644 --- a/coders/tiff.c +++ b/coders/tiff.c @@ -1137,7 +1137,7 @@ static CustomStreamInfo *TIFFAcquireCustomStreamForReading( return(custom_stream); } -static void TIFFReadPhotoshopLayers(Image* image,const ImageInfo *image_info, +static void TIFFReadPhotoshopLayers(const ImageInfo *image_info,Image *image, ExceptionInfo *exception) { const char @@ -1152,6 +1152,9 @@ static void TIFFReadPhotoshopLayers(Image* image,const ImageInfo *image_info, Image *layers; + ImageInfo + *clone_info; + PhotoshopProfile photoshop_profile; @@ -1205,7 +1208,10 @@ static void TIFFReadPhotoshopLayers(Image* image,const ImageInfo *image_info, AttachCustomStream(layers->blob,custom_stream); SeekBlob(layers,(MagickOffsetType) i,SEEK_SET); InitPSDInfo(layers,&info); - (void) ReadPSDLayers(layers,image_info,&info,exception); + clone_info=CloneImageInfo(image_info); + clone_info->number_scenes=0; + (void) ReadPSDLayers(layers,clone_info,&info,exception); + clone_info=DestroyImageInfo(clone_info); DeleteImageFromList(&layers); if (layers != (Image *) NULL) { @@ -2274,7 +2280,7 @@ RestoreMSCWarning } } while ((status != MagickFalse) && (more_frames != MagickFalse)); TIFFClose(tiff); - TIFFReadPhotoshopLayers(image,image_info,exception); + TIFFReadPhotoshopLayers(image_info,image,exception); if ((image_info->number_scenes != 0) && (image_info->scene >= GetImageListLength(image))) status=MagickFalse; -- 2.40.0