Code: Select all
diff --git a/magick/image.c b/magick/image.c
index 1abd8ac..fe71f8c 100644
--- a/magick/image.c
+++ b/magick/image.c
@@ -1186,8 +1186,8 @@ MagickExport ImageInfo *CloneImageInfo(const ImageInfo *image_info)
clone_info->temporary=image_info->temporary;
clone_info->adjoin=image_info->adjoin;
clone_info->antialias=image_info->antialias;
- clone_info->scene=image_info->subimage;
- clone_info->number_scenes=image_info->subrange;
+ clone_info->scene=image_info->scene;
+ clone_info->number_scenes=image_info->number_scenes;
clone_info->depth=image_info->depth;
if (image_info->size != (char *) NULL)
(void) CloneString(&clone_info->size,image_info->size);
Code: Select all
diff --git a/magick/image.c b/magick/image.c
index 1abd8ac..41e4529 100644
--- a/magick/image.c
+++ b/magick/image.c
@@ -1186,8 +1186,16 @@ MagickExport ImageInfo *CloneImageInfo(const ImageInfo *image_info)
clone_info->temporary=image_info->temporary;
clone_info->adjoin=image_info->adjoin;
clone_info->antialias=image_info->antialias;
- clone_info->scene=image_info->subimage;
- clone_info->number_scenes=image_info->subrange;
+ if (image_info->scene == 0 && image_info->number_scenes == 0)
+ {
+ clone_info->scene=image_info->subimage;
+ clone_info->number_scenes=image_info->subrange;
+ }
+ else
+ {
+ clone_info->scene=image_info->scene;
+ clone_info->number_scenes=image_info->number_scenes;
+ }
clone_info->depth=image_info->depth;
if (image_info->size != (char *) NULL)
(void) CloneString(&clone_info->size,image_info->size);
Please fix this, because as it is in 6.5.4-10, the code that actually uses new members is punished, while code that uses deprecated subimage/subrange is unaffected.