Animated GIF doesn't work in IE

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
gregory
Posts: 67
Joined: 2009-08-02T17:20:23-07:00
Authentication code: 8675309

Animated GIF doesn't work in IE

Post by gregory »

Hi,

I have a web service which uses ImageMagick. Peoples create animated gifs.
Some animated gifs are okay but sometimes IM creates GIFs which work in Firefox, Opera, Chrome and doesn't work in IE.
Just first frame without animation.

Here is an example:
Image

Does somebody know what is the problem?
I tried to find the answer in Google but there is nothing I found.

I'm running: convert -loop 0 -dispose 2 -delay SPEED img*.gif result.gif
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Animated GIF doesn't work in IE

Post by fmw42 »

I am not an expert on animation nor especially on IE, but try

convert -delay SPEED img*.gif -dispose 2 -loop 0 result.gif

possibly you may need some other dispose method for IE (which IE are you using?)
gregory
Posts: 67
Joined: 2009-08-02T17:20:23-07:00
Authentication code: 8675309

Re: Animated GIF doesn't work in IE

Post by gregory »

There is no difference between IE7 and IE8.
gregory
Posts: 67
Joined: 2009-08-02T17:20:23-07:00
Authentication code: 8675309

Re: Animated GIF doesn't work in IE

Post by gregory »

Any ideas?
I think it's an IM bug.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Animated GIF doesn't work in IE

Post by fmw42 »

why would it be an IM bug if it works fine in all the the other browsers?

If a bug in IM, then have you considered upgrading IM. What version is your provider using? There were some old versions of IM that had problems with animation, but it was across the boards with respect to browsers.

Your gif above works fine in my Safari, Firefox, Opera and IE 5 on my Mac
gregory
Posts: 67
Joined: 2009-08-02T17:20:23-07:00
Authentication code: 8675309

Re: Animated GIF doesn't work in IE

Post by gregory »

I'm using the latest version of ImageMagick (also I tried to use 6.2 version).
I think it's a bug because IM can include some specific information in a source of image so IE can't read it and show animation properly.
Also I think it's an IM bug because there are no problem in IE with animations made in ImageReady or other software. Only when I make animation using IM.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Animated GIF doesn't work in IE

Post by fmw42 »

but you said sometimes they work in IE and sometimes not, if I don't misunderstand. So that makes it harder to believe that it is due to IM. But I guess it could be. I shall leave this to the IM folks to confirm with you about it being a bug or not in IM.

However, if there is something special that needs to be added just for IE, I think it might help the IM folks if you could point out where to find that information.
gregory
Posts: 67
Joined: 2009-08-02T17:20:23-07:00
Authentication code: 8675309

Re: Animated GIF doesn't work in IE

Post by gregory »

I can just say that I used:
Windows XP + IE 7
Windows XP + IE 8
Windows Vista + IE7
Windows Vista + IE8

You can show them this image. I've asked to check this image for about 10 peoples. Everybody said there's no animation in IE.
If you need some additional information please ask.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Animated GIF doesn't work in IE

Post by magick »

The question is, is this an ImageMagick bug or an IE bug? If you can prove its an ImageMagick bug, we will fix it. Since all the major browsers other than IE can animate the images we suspect its a bug in IE.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Animated GIF doesn't work in IE

Post by fmw42 »

Nevermind, Magick has spoken.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Animated GIF doesn't work in IE

Post by anthony »

I would concur with Magick. I doubt it is a bug in IM I wrote (or re-wrote) most of the animation code to make sure it works correctly.

Also I would not use a value like '2' for a dispose method. What do you think '2' is?

Looking things up '2' is equivelent to 'Background' Disposal. Something that a lot of old browsers (for example Mosaic, if you were around before the 'Super-Highway') did not implement properly.

Actually NO browser implements the GIF specification properly as ALL of them actually ignores the 'background' color setting. That is because in a browser, background is really what is behind the animation, (that is 'transparency') and NOT the GIF background meta-data setting. So no one uses it, not even IM.

Also have you compared the verbose output of the ImageReady version with the IM version, it may be that IE does not handle a specific dispose method, and ImageReady avoids that method.

A good way of finding out all the animation settings being used by a GIF animation is to use the script... "gif2anim"
http://www.imagemagick.org/Usage/scripts/gif2anim
See the introduction in
http://www.imagemagick.org/Usage/anim_basics/#sequence

This reports all the IM commands that would have been used to originally build the animation, as well as seperate the animations frames AS IS, with any and all their optimizations.

Actually I recommend you read that whole section
http://www.imagemagick.org/Usage/anim_basics/
In which I tried to completely explain all aspects of GIF animations
the next section on Optimization is also a recommendation so as to understand
why a working animation can look so complex and convoluted when viewed as raw data.
http://www.imagemagick.org/Usage/anim_opt/
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
gregory
Posts: 67
Joined: 2009-08-02T17:20:23-07:00
Authentication code: 8675309

Re: Animated GIF doesn't work in IE

Post by gregory »

I'm using "-dispose 2" for the situations when somebody wants to make an animation from images with different sizes. Am I not right?
What will you recommend? Do not use dispose or use it with other option?
gregory
Posts: 67
Joined: 2009-08-02T17:20:23-07:00
Authentication code: 8675309

Re: Animated GIF doesn't work in IE

Post by gregory »

I've tried to use "-dispose none" now but it didn't help. :-(
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Animated GIF doesn't work in IE

Post by fmw42 »

try rearranging your command line as I mentioned before

convert -delay SPEED img*.gif -loop 0 result.gif


What version of IM are you using? If old, upgrade! The latest IM 6.5.4-8

Perhaps it is the original gif images you are using. Perhaps they are malformed?
gregory
Posts: 67
Joined: 2009-08-02T17:20:23-07:00
Authentication code: 8675309

Re: Animated GIF doesn't work in IE

Post by gregory »

1. I'm using the latest version of ImageMagick.
2. I've tried to use different command line but it didn't help.
3. Also I've noticed that some .gif files always freeze an animation if they are in the first frame of animation. But I always change the size of photo before make animation.
I mean, how this image can be broken if I use "convert -resize" for all batch of images ane after that "convert -loop" for this resized images? So I'm using resized images made with IM. It means that IM makes broken .gif from jpg/gif/png or what? There is a big percent of broken images.

resize:
convert img.gif -resize SIZE result.gif
Post Reply