Page 1 of 1

Gif into animated Tiles

Posted: 2018-06-12T05:33:29-07:00
by timb9o
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?

Re: Gif into animated Tiles

Posted: 2018-06-12T09:47:03-07:00
by fmw42
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 http://www.imagemagick.org/Usage/anim_mods/#crop

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