Currency ImageMagick GIF coder can't complete processing GIF frames halfway.
There is a situation of giving up GIF decoding itself even if it can decode only one frame.
GIF animation can be intertframe-compressed with dispose method, ImageMagick expands all frames to RGB(A) array in the original spacial size, so memory usage tends to unintentionally expand compared to the original GIF file size.
N/A
consideration
future suggestions
However, it may be better to implement these items after applying frames limit options to some animation image formats at least.
We have a global limit for this inside the security policy:
C#
<policy domain="resource" name="list-length" value="128"/>
I wonder if we have a could also make something generic to limit the length of the list for all image formats with a define. Maybe @urban-warrior has some ideas on how we could implement this?
Oh. I see..
I drop my "future suggestions" env & policy.
However, the resource "list-length" limit does't save memory usage for GIF decode processing.
https://github.com/ImageMagick/ImageMagick/pull/1181
This PR will resolve it.
Thank you for your proposal and patch. However, ImageMagick can already limit the number of frames. For example:
convert 'image.gif[0-14]' null:
Sorry for taking your time, and thank you very much.
Thank you for letting me notice my misunderstanding.
GIF coder can complete processing GIF frames halfway.
I overlooked following code, relative to 'image.gif[0-14]'
* coders/gif.c
if (image_info->number_scenes != 0)
if (image->scene >= (image_info->scene+image_info->number_scenes-1))
break;
Thanks!