(void) RelinquishUniqueFileResource(read_info->filename);
if (IsSceneGeometry(read_info->scenes,MagickFalse) != MagickFalse)
{
+ int
+ first_scene,
+ last_scene,
+ n;
+
Image
*clones;
- clones=CloneImages(image,read_info->scenes,exception);
- if (clones != (Image *) NULL)
+ n=sscanf(read_info->scenes,"%d-%d",&first_scene,&last_scene);
+ if (n != 2)
{
- image=DestroyImageList(image);
- image=GetFirstImageInList(clones);
+ clones=CloneImages(image,read_info->scenes,exception);
+ if (clones != (Image *) NULL)
+ {
+ image=DestroyImageList(image);
+ image=GetFirstImageInList(clones);
+ }
}
}
for (next=image; next != (Image *) NULL; next=GetNextImageInList(next))