Tiles to 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
Sass

Tiles to GIF

Post by Sass »

I have a 960x192 PNG image with 80 48x48 px icons on it. I need to convert it into a 48x48 px animated GIF image. Can someone point me to a thread that shows this command syntax or give me an example?

Thanks
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Tiles to GIF

Post by anthony »

-crop 48x48 then set delay using -set delay 30 and save to GIF.

See IM Examples Cutting and Bordering, Tile Cropping.
http://www.imagemagick.org/Usage/crop /#crop_tile
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Sass

Re: Tiles to GIF

Post by Sass »

ok, i tried this:

convert myimage.png -crop 48x48 -repage 48x48 myimage.gif

The result is a 48x48 pixel image of the first icon - sometimes it flickers. Not desired. I am missing some syntax to make the next icon replace the previous icon to create the animation effect.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Tiles to GIF

Post by anthony »

The GIF should contain ALL the 48x48 images, do an identify on it.

If you wan then as seperate files add +adjoin to the command
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply