converting animated gif to a static gif

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
avothecat

converting animated gif to a static gif

Post by avothecat »

I'm simply using the convert utility (in php, I don't think that changes anything) to resize large images to smaller ones (previews, thumbnails, etc)
I searched google a lot, and looked through the docs on the official site, but didn't find what I need...

Is there a method to only convert the first frame of a gif?

I don't know, "convert huge_image_animated.gif -resize !300x300> preview_static.gif -static" , or something.
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: converting animated gif to a static gif

Post by el_supremo »

This should do it:

Code: Select all

convert huge_image_animated.gif[0] -resize "!300x300>" preview_static.gif

Pete
avothecat

Re: converting animated gif to a static gif

Post by avothecat »

Thanks, that worked perfect :)
Post Reply