Page 1 of 1

Broken output animations

Posted: 2010-12-03T02:34:34-07:00
by Urban
Hi, recently ran into a problem while resizing some animated GIFs with ImageMagic. I've always used the following command-line options:

convert.exe -coalesce -resize 320x320 -alpha set +repage -layers optimize source.gif converted.gif

But now I got a large number of files that can not be properly processed. My output files look a bit strange:

Image

I tried to resave this source file with PhotoScape (without applying any changes e.g. resize, crop etc.), and the problem dissapeared :shock: Howevevr, the filesize increased significantly. The problem is that I need to resize about 2000+ files, so there is no way to resave each source file manually :?

Here you can dl the source and resaved files, and output images for both of them: http://rghost.ru/3464934 Maybe someone can help? :(

P.S. Sorry for my bad english.

Re: Broken output animations

Posted: 2010-12-03T03:24:51-07:00
by GreenKoopa
I notice that you are using the old syntax. For more information see http://www.imagemagick.org/Usage/basics/#why

The new syntax would be more like
convert.exe source.gif -coalesce -resize 320x320 -alpha set +repage -layers optimize converted.gif

This may not be your only problem, but I don't see anything obvious.

Re: Broken output animations

Posted: 2010-12-06T00:44:49-07:00
by anthony
Urban wrote:convert.exe -coalesce -resize 320x320 -alpha set +repage -layers optimize source.gif converted.gif
Other than reading the source image first....
-alpha set is not needed and +repage is already done by -coalesce (it is part of its defined operation, convert all frames to full images without offsets.

So trying
convert source.gif -coalesce -resize 320x320 miff:- | animate -
Perfect resize!
try optimize....
convert source.gif -coalesce -resize 320x320 -layers optimize miff:- | animate -
No problems
try GIF image file format
convert source.gif -coalesce -resize 320x320 -layers optimize gif:- | animate -
now problems.
Save to a gif and use web broswer to view -- no problems.

I can't see anything wrong.

How old is your IM? Should be new enough as you used -layers optimize
Perthas you have a specific version that had some bad bug in it that was later fixed.