With less than 10 frames, animated gifs come out fine (with convert.exe)
after 10 frames, it shows frame 1, then 10, then continues as normal. at the end, it pauses before looping.
Error with animators with over 10 frames
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Error with animators with over 10 frames
Can you give use a more detailed example?
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Error with animators with over 10 frames
This animation has 11 frames, titled frame[0-10].gif. Each one has one more letter than the last.
It was made with the command convert.exe -delay 30 -loop 0 frames/frame*.gif result.gif, which worked for animations with 9 or less frames.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Error with animators with over 10 frames
Well that your problem!!!! You assume IM recieved your images in numerical order! It didn.t The order is NOT what IM recieved and thus not IM's fault!flintstone wrote:Code: Select all
convert.exe -delay 30 -loop 0 frames/frame*.gif result.gif
The rest of the animation does not appear as it is using a transparent background without using a -dispose background or -dispose previous to clear the old frames completely. So the frames just overwrite what the second frame has already drawn, making no more changes. See IM examples, Animation Basics for details of disposal methods!
try this...
Code: Select all
echo frames/frame*.gif
WHY? because it is sorts alphabetically, NOT numerically
Use this instead.
Code: Select all
convert.exe -delay 30 -loop 0 frames/frame?.gif frames/frame??.gif result.gif
OR if you have a more advanced shell (like bash) use...
Code: Select all
convert.exe -delay 30 -loop 0 frames/frame{?,??,???}.gif result.gif
01 02 03 ... 09 10 11
See IM Examples, Writing a Multi-Image Sequence for other alternatives for reading files numerically.
There are also tools and utilities that you can use to do this, for you.
I have one called mv_renum that renames files so it expands numbers to enough digits to match the largest number given.
I have another script (same one actually just with a different name) called mv_reseq that will resequence the numbers to start at the number given (1 by default) and increment the files by a second number given (1) I use this to expand filenames so I can insert extra files inbetween, then contract the numbers back down to incrementing numbers again. Very useful for sorting image sequences.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/