Animated GIF resizing problem

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
yezimeng_115
Posts: 3
Joined: 2015-09-05T05:45:31-07:00
Authentication code: 1151

Animated GIF resizing problem

Post by yezimeng_115 »

My animated GIF seems not converted correctly, any idea? Thanks.
ImageMagick 6.8.6-6 on Mac
convert -resize 200x200\> 1.gif 2.gif
source:
Image
result:
Image
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Animated GIF resizing problem

Post by snibgo »

It works fine for me, IM v6.9.1-6.

Your command is in the wrong order. You should read the input, then process, then write the output.

GIFs are often optimized, and need to be de-optimized first. So this would be a better command:

Code: Select all

convert 20rlmk6.jpg.gif -layers coalesce -resize 200x200^> -layers optimize out.gif
snibgo's IM pages: im.snibgo.com
yezimeng_115
Posts: 3
Joined: 2015-09-05T05:45:31-07:00
Authentication code: 1151

Re: Animated GIF resizing problem

Post by yezimeng_115 »

Thanks a lot, it works except -layers optimize

convert 1.gif -layers coalesce -resize 200x200^> -layers optimize 2.gif
convert: unable to open image `optimize': No such file or directory @ error/blob.c/OpenBlob/2643.
convert: no decode delegate for this image format `optimize' @ error/constitute.c/ReadImage/552.
yezimeng_115
Posts: 3
Joined: 2015-09-05T05:45:31-07:00
Authentication code: 1151

Re: Animated GIF resizing problem

Post by yezimeng_115 »

This one works! Thanks!
convert 1.gif -layers coalesce -resize 200x200\> -layers optimize 2.gif
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Animated GIF resizing problem

Post by snibgo »

snibgo wrote:-resize 200x200^>
The caret ^ is Windows escape. I forgot you were using bash, so needed backslash \. Sorry.
snibgo's IM pages: im.snibgo.com
Post Reply