How do i reverse the frames of an sprite sheet with each frame of size 30x30 and horizontally aligned using Imagemagick?
Example:
http://i.stack.imgur.com/OIoYc.png ->>> http://i.stack.imgur.com/7WR9v.png (edited)
How do i reverse the frames of an sprite sheet with each frame of size 30x30 and horizontally aligned using Imagemagick?
Example:
http://i.stack.imgur.com/OIoYc.png ->>> http://i.stack.imgur.com/7WR9v.png (edited)
You can do that like this...
First, create three little 30x30 images in Red, Green and Blue:
convert -size 30x30! xc:red red.png
convert -size 30x30! xc:green green.png
convert -size 30x30! xc:blue blue.png
then append them side by side:
convert +append red.png green.png blue.png image.png
to get this:

Now crop that into 30x30 pixel frames, and reverse the order of the frames, then re-append them together into the output image.
convert -crop 30x30 image.png -reverse +append out.png

Note:
For future reference, if anyone wants to do the same thing but vertically instead of horizontally, just change +append to -append.