From 5d48cd31297c1adbc6c9b7b075d5ae935d64931a Mon Sep 17 00:00:00 2001 From: Cristy Date: Sat, 9 Feb 2019 11:36:46 -0500 Subject: [PATCH] ... --- MagickCore/constitute.c | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/MagickCore/constitute.c b/MagickCore/constitute.c index e737d5753..9456536fc 100644 --- a/MagickCore/constitute.c +++ b/MagickCore/constitute.c @@ -627,29 +627,17 @@ MagickExport Image *ReadImage(const ImageInfo *image_info, "notify the developers",image->magick,exception->severity); if (IsBlobTemporary(image) != MagickFalse) (void) RelinquishUniqueFileResource(read_info->filename); - if (IsSceneGeometry(read_info->scenes,MagickFalse) != MagickFalse) + if ((IsSceneGeometry(read_info->scenes,MagickFalse) != MagickFalse) && + (GetImageListLength(image) != 1)) { - int - first_scene, - last_scene, - n; - Image *clones; - n=sscanf(read_info->scenes,"%d-%d",&first_scene,&last_scene); - if (n == 2) + clones=CloneImages(image,read_info->scenes,exception); + if (clones != (Image *) NULL) { - clones=CloneImages(image,read_info->scenes,exception); - if (clones == (Image *) NULL) - (void) ThrowMagickException(exception,GetMagickModule(),OptionError, - "SubimageSpecificationReturnsNoImages","`%s'", - read_info->filename); - else - { - image=DestroyImageList(image); - image=GetFirstImageInList(clones); - } + image=DestroyImageList(image); + image=GetFirstImageInList(clones); } } for (next=image; next != (Image *) NULL; next=GetNextImageInList(next)) -- 2.40.0