Center layers relative to each other
Posted: 2016-07-03T12:45:49-07:00
Consider a folder with a bunch of images with different dimensions. For testing purposes, we can use these input images:
Now I'd like to combine that whole folder into a single GIF animation.
The following works, but it aligns the images to the top left corner:
How can I automatically center all frames (both vertically and horizontally), without having to manually specify a -page offset for each one?
Code: Select all
mkdir frames
convert rose: frames/01.png
convert granite: frames/02.png
The following works, but it aligns the images to the top left corner:
Code: Select all
convert -delay 50 frames/*.png -layers trim-bounds out.gif
How can I automatically center all frames (both vertically and horizontally), without having to manually specify a -page offset for each one?