Page 1 of 1

gif animation loop lost in conversion ?

Posted: 2017-01-08T13:27:23-07:00
by coloring
Hello

It seems like cropping certain uncommon animated gif results in the loss of the loop
the animation will only play once then

I use the command

trimmer=`convert image.gif -coalesce -flatten -format %@ info:`
convert image.gif -coalesce -crop $trimmer +repage result.gif

anybody knows why it happens on certain gif
and is there any way to fix the loop?

thank you

Re: gif animation loop lost in conversion ?

Posted: 2017-01-08T13:42:41-07:00
by fmw42
Your command works fine for me on IM 6.9.7.2 Q16 Mac OSX. What is your IM version and platform? Perhaps you need to upgrade.

Please always provide your IM version and platform in the future.

Re: gif animation loop lost in conversion ?

Posted: 2017-01-08T14:30:14-07:00
by GeeMack
coloring wrote: 2017-01-08T13:27:23-07:00anybody knows why it happens on certain gif
and is there any way to fix the loop?
Near the top of the page at THIS link it describes the delay and loop settings. You might be able to add "-loop 0" just before the output of your command to fix the issue...

Code: Select all

... -loop 0 output.png

Re: gif animation loop lost in conversion ?

Posted: 2017-01-08T20:04:04-07:00
by coloring
@GeeMack
Thank you so much Good Sir, once again you're spot on, you truly deserve the title of magician :D


@fmw42
thanks for the advice, I'll provide IM version next time I ask a question :)

Re: gif animation loop lost in conversion ?

Posted: 2017-01-08T20:44:04-07:00
by fmw42
If you read my message above, you will see that it worked fine for me. I animated and looped continuously for me. No addition of -loop 0 was needed. That was why I asked you for your IM version to see if you needed an upgrade.

Re: gif animation loop lost in conversion ?

Posted: 2017-01-08T23:16:18-07:00
by coloring
i use IM 6 from jessie repository
6.8.9.9-5+deb8u6

I can't update IM freely or I wouldn't be synched with the repository anymore, which wouldn't be safe

this might be a bug in an earlier version
anyway the loop option is a great workaround so everything is fine now :)