Gif into animated Tiles

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
Posts: 1
Joined: 2018-06-12T05:17:27-07:00
Authentication code: 1152

Gif into animated Tiles

Post by timb9o » 2018-06-12T05:33:29-07:00

Hello everybody,

so, I have used imagemagick many times to split Tilemaps into individual Tiles and many more things, however now I have finally hit a Roadblocker that I have trouble overcoming.
I am using a Chat tool (Hipchat), where you can add you own emotes, however they are very small. Thus I have created some split images that I then stitch back together to create bigger emotes.
For that I obviously used the following command:

Code: Select all

convert -crop 32x32 source.jpg folder\tile%d.jpg
For animated gifs however, the image is then split into one image for each frame.
Is there a way to split the gif into tiles, but keeping the animation for each tile?

I also tried following the directions from this Forum entry viewtopic.php?t=10027

Code: Select all

convert -crop 50%x50% source.gif +repage  folder\tiles%d.gif

Code: Select all

mogrify +repage tiles*
but with no success.

Does anyone know how to go about this?

User avatar
Posts: 24587
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Gif into animated Tiles

Post by fmw42 » 2018-06-12T09:47:03-07:00

I think you can only crop one section at a time by specifying the desired offsets. So I think you will need to write a script loop to crop each desired section of the animation. See

Also your syntax is not proper. The input should come right after convert. However, IM 6 is forgiving, but IM 7 is not.

Post Reply