Page 1 of 1
gifs not looping when viewed in gmerlin
Posted: 2014-03-18T03:39:37-07:00
by hellocatfood
I'm trying to diagnose a problem with another program that may be caused by a defect in imagemagick. I'm running pd extended 0.43.4 on Ubuntu 13.10. I've install gmerlin in order to play animated gifs within that program.
If I play gifs made in imagemagick they only play once and don't loop. If I play ones made in GIMP then they loop forever. What is GIMP doing that imagemagick isn't? Here is the
original bug report.
Here is the original gif file
http://i.imgur.com/npym0Bq.gif
For completeness I reencoded it in imagemagick
http://i.imgur.com/WvBNnZ4.gif (convert originalgif.gif -coalesece images.png ; convert images*.png newgif.gif)
Here is the new gif, saved in GIMP
http://i.imgur.com/51YOrMS.gif and a screenshot of the parameters I used when svaing the gif in GIMP
http://i.imgur.com/ZFc4iwl.png
Can anyone help?
Re: gifs not looping when viewed in gmerlin
Posted: 2014-03-18T05:06:19-07:00
by dlemstra
I think the application is reading the file generated by ImageMagick incorrectly. We write two application extensions (
http://www.matthewflickinger.com/lab/wh ... sion_block) It probably assumes both blocks contain information about the animation loop. It should check if the application identifier is NETSCAPE2.0.
Re: gifs not looping when viewed in gmerlin
Posted: 2014-03-18T06:29:42-07:00
by magick
Add -loop 0 on your command-line. That tells the GIF animation to loop forever.
Re: gifs not looping when viewed in gmerlin
Posted: 2014-03-18T06:35:50-07:00
by hellocatfood
magick wrote:Add -loop 0 on your command-line. That tells the GIF animation to loop forever.
It still only plays once in Pure Data even if I use the -loop 0 option.
Re: gifs not looping when viewed in gmerlin
Posted: 2014-03-18T10:20:43-07:00
by fmw42
Does it loop when displayed in a browser? If it does, then it sounds like a limitation of Pure Data.
Re: gifs not looping when viewed in gmerlin
Posted: 2014-03-18T10:23:19-07:00
by hellocatfood
fmw42 wrote:Does it loop when displayed in a browser? If it does, then it sounds like a limitation of Pure Data.
Yes, they do. Time to hit the Pure Data bug reporter, then!
Is there an attribute in the gif made by GIMP that is not being set when made in imagemagick?
Re: gifs not looping when viewed in gmerlin
Posted: 2014-03-18T10:43:21-07:00
by fmw42
Is there an attribute in the gif made by GIMP that is not being set when made in imagemagick?
Are you saying that you can create an animation in GIMP that loops multiple time in Pure Data? If so, then I suspect that GIMP is doing something special. The IM developers would have to look further into this and I suggest you post this to the Developers forum to review.
Can you provide an example animation that you created in GIMP that works for you and the same one that does not work from IM so the developers can examine both to see the differences. You can upload to dropbox.com (public folder) and then put links here.
Re: gifs not looping when viewed in gmerlin
Posted: 2014-03-18T10:58:02-07:00
by hellocatfood
fmw42 wrote:Is there an attribute in the gif made by GIMP that is not being set when made in imagemagick?
Are you saying that you can create an animation in GIMP that loops multiple time in Pure Data? If so, then I suspect that GIMP is doing something special. The IM developers would have to look further into this and I suggest you post this to the Developers forum to review.
Bingo! The first post in this thread was a bit wordy but explains the situation.
Can you provide an example animation that you created in GIMP that works for you and the same one that does not work from IM so the developers can examine both to see the differences. You can upload to dropbox.com (public folder) and then put links here.
Certainly.
IM gif (does not loop in Pure Data)
http://i.imgur.com/WvBNnZ4.gif
GIMP gif (does loop in Pure Data)
http://i.imgur.com/51YOrMS.gif Preferences used when saving in GIMP
http://i.imgur.com/ZFc4iwl.png
Re: gifs not looping when viewed in gmerlin
Posted: 2014-03-18T11:43:17-07:00
by fmw42
(re-)post your IM exact IM command (if different from your earlier post) to create this gif and your version of IM and platform.
Re: gifs not looping when viewed in gmerlin
Posted: 2014-03-18T17:35:59-07:00
by hellocatfood
fmw42 wrote:(re-)post your IM exact IM command (if different from your earlier post) to create this gif and your version of IM and platform.
From a folder full of pngs I ran
Code: Select all
convert images*.png -loop 0 newgif.gif
I'm running Imagemagick 6.7.7.10 on Ubuntu 13.10
Re: gifs not looping when viewed in gmerlin
Posted: 2014-03-18T18:01:38-07:00
by fmw42
convert images*.png -loop 0 newgif.gif
Does it make any difference if you add a specific delay. Some viewer cannot handle an animation with zero or less than some minimum delay. Your GIF animation shows a 100 delay. But the IM animation has no delay set. You can see that from the verbose information presented by identify -verbose file.gif for each file.
try adding -delay 100 to match your GIF animation
Code: Select all
convert -delay 100 images*.png -loop 0 newgif.gif
see if that works. If so change the delay to whatever you want that is large enough not to fail on your software.
You might also explore optimizing the animation. See
http://www.imagemagick.org/Usage/anim_opt/ and
http://www.imagemagick.org/script/comma ... php#layers
For example
Code: Select all
convert -delay 100 images*.png -layers optimize -loop 0 newgif.gif
Re: gifs not looping when viewed in gmerlin
Posted: 2014-03-18T18:29:54-07:00
by hellocatfood
fmw42 wrote:convert images*.png -loop 0 newgif.gif
Does it make any difference if you add a specific delay. Some viewer cannot handle an animation with zero or less than some minimum delay. Your GIF animation shows a 100 delay. But the IM animation has no delay set. You can see that from the verbose information presented by identify -verbose file.gif for each file.
try adding -delay 100 to match your GIF animation
Code: Select all
convert -delay 100 images*.png -loop 0 newgif.gif
see if that works. If so change the delay to whatever you want that is large enough not to fail on your software.
Explicitly setting a delay worked perfectly! Even a delay of 1 still worked.
Thanks!