gifs not looping when viewed in gmerlin
- hellocatfood
- Posts: 44
- Joined: 2010-01-01T13:29:41-07:00
- Authentication code: 8675309
gifs not looping when viewed in gmerlin
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?
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
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
Add -loop 0 on your command-line. That tells the GIF animation to loop forever.
- hellocatfood
- Posts: 44
- Joined: 2010-01-01T13:29:41-07:00
- Authentication code: 8675309
Re: gifs not looping when viewed in gmerlin
It still only plays once in Pure Data even if I use the -loop 0 option.magick wrote:Add -loop 0 on your command-line. That tells the GIF animation to loop forever.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: gifs not looping when viewed in gmerlin
Does it loop when displayed in a browser? If it does, then it sounds like a limitation of Pure Data.
- hellocatfood
- Posts: 44
- Joined: 2010-01-01T13:29:41-07:00
- Authentication code: 8675309
Re: gifs not looping when viewed in gmerlin
Yes, they do. Time to hit the Pure Data bug reporter, then!fmw42 wrote:Does it loop when displayed in a browser? If it does, then it sounds like a limitation of Pure Data.
Is there an attribute in the gif made by GIMP that is not being set when made in imagemagick?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: gifs not looping when viewed in gmerlin
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.Is there an attribute in the gif made by GIMP that is not being set when made in imagemagick?
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.
- hellocatfood
- Posts: 44
- Joined: 2010-01-01T13:29:41-07:00
- Authentication code: 8675309
Re: gifs not looping when viewed in gmerlin
Bingo! The first post in this thread was a bit wordy but explains the situation.fmw42 wrote: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.Is there an attribute in the gif made by GIMP that is not being set when made in imagemagick?
Certainly.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.
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
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: gifs not looping when viewed in gmerlin
(re-)post your IM exact IM command (if different from your earlier post) to create this gif and your version of IM and platform.
- hellocatfood
- Posts: 44
- Joined: 2010-01-01T13:29:41-07:00
- Authentication code: 8675309
Re: gifs not looping when viewed in gmerlin
From a folder full of pngs I ranfmw42 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.
Code: Select all
convert images*.png -loop 0 newgif.gif
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: gifs not looping when viewed in gmerlin
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.convert images*.png -loop 0 newgif.gif
try adding -delay 100 to match your GIF animation
Code: Select all
convert -delay 100 images*.png -loop 0 newgif.gif
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
- hellocatfood
- Posts: 44
- Joined: 2010-01-01T13:29:41-07:00
- Authentication code: 8675309
Re: gifs not looping when viewed in gmerlin
Explicitly setting a delay worked perfectly! Even a delay of 1 still worked.fmw42 wrote: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.convert images*.png -loop 0 newgif.gif
try adding -delay 100 to match your GIF animation
see if that works. If so change the delay to whatever you want that is large enough not to fail on your software.Code: Select all
convert -delay 100 images*.png -loop 0 newgif.gif
Thanks!