Shortening GIF animations

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
jounihat

Shortening GIF animations

Post by jounihat »

Hello Everyone!

I'm making thumbnails of documents to my web site ( http://weeb2.net ) using ImageMagick to convert them from PDF to gif animations. However, if a document is hundreds of pages long, the size of the preview can be almost as big as the file itself (even bigger sometimes). So, I would like to limit the length of the preview to maybe 20 first pages.

How is it possible to determine the length of a gif animation or shorten an already made gif animation?

By the way, thanks really much for this program! It's already serving my web site fabulously.


With Best Regards
Jouni
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Shortening GIF animations

Post by fmw42 »

you can select frames of a gif animation using frame indices

convert animation.gif[0-10] new_animation.gif

see Anthony's documentation about animations and basic usage, etc at http://www.imagemagick.org/Usage/
jounihat

Re: Shortening GIF animations

Post by jounihat »

Thank you very much! I tried to find it from the manual for long time, but for some reason I didn't see it.
Post Reply