anthony wrote:Update IM Examples Layering, Append with Overlap
It looks like everyone overlooked one of the simpler approaches to the OP...
Append with Space or Overlap Using "Smush"
A more flexible counterpart to the "-append" operation is "-smush". It takes one argument and acts on the current stack of two or more images. Instead of just connecting images edge to edge like "-append", "-smush" also lets you connect images separated by some amount of space or even with an overlap. The "-smush" operator obeys the "-gravity" setting, so given an argument of zero, "-smush" should mimic "-append" exactly.
Like "-append", the "-smush" option attaches a sequence of images together vertically, while the plus form "+smush" attaches them horizontally.
To connect two or more images side by side with space between them, use a positive number as an argument to "+smush"...
Code: Select all
convert granite: rose: -background none -gravity east +smush 10 smush_space.gif
Using a negative argument to "-smush" will cause the images to overlap by that much...
Code: Select all
convert granite: rose: -background none -gravity south -smush -10 smush_overlap.gif
The "-smush" operation overlaps the images from left to right or top to bottom. It's simple to alter that behavior with combinations of "-flip" or "-flop", and "-reverse"...
Code: Select all
convert granite: rose: gradient:[128x] -background none \
-gravity center -reverse -flip -smush -10 -flip smush_backward.gif
Any empty space surrounding or between images will be filled with the "-background" color.