Skip to content

Commit e00ca02

Browse files
committed
Some refactoring of reading the tiff image.
1 parent 00898f9 commit e00ca02

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

coders/ept.c

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,8 @@ static Image *ReadEPTImage(const ImageInfo *image_info,ExceptionInfo *exception)
164164
ept_info;
165165

166166
Image
167-
*image;
167+
*image,
168+
*tiff_image;
168169

169170
ImageInfo
170171
*read_info;
@@ -256,20 +257,13 @@ static Image *ReadEPTImage(const ImageInfo *image_info,ExceptionInfo *exception)
256257
(void) CopyMagickString(read_info->magick,"EPS",MagickPathExtent);
257258
image=BlobToImage(read_info,postscript_data,ept_info.postscript_length,
258259
exception);
259-
if (image == (Image *) NULL)
260+
(void) CopyMagickString(read_info->magick,"TIFF",MagickPathExtent);
261+
tiff_image=BlobToImage(read_info,tiff_data,ept_info.tiff_length,exception);
262+
if (tiff_image != (Image*) NULL)
260263
{
261-
(void) CopyMagickString(read_info->magick,"TIFF",MagickPathExtent);
262-
image=BlobToImage(read_info,tiff_data,ept_info.tiff_length,exception);
263-
}
264-
else
265-
{
266-
Image
267-
*tiff_image;
268-
269-
(void) CopyMagickString(read_info->magick,"TIFF",MagickPathExtent);
270-
tiff_image=BlobToImage(read_info,tiff_data,ept_info.tiff_length,
271-
exception);
272-
if (tiff_image != (Image *) NULL)
264+
if (image == (Image*) NULL)
265+
image=tiff_image;
266+
else
273267
AppendImageToList(&image,tiff_image);
274268
}
275269
read_info=DestroyImageInfo(read_info);

0 commit comments

Comments
 (0)