I think this is an easy one.
I have 2 Pictures/JPGs and i want them to merge into one picture where the 2 are side by side.
So i have pic [A] and pic [B] and I want to get pic [AB] (side by side).
Both images have same width and height. In this case width=200px and height=300px. But the 2nd Image should appear on position 200,0 .. also when imagewidth is smaller than 200px (200px is maxwidth)
This is what I've tried (php):
exec($IMAGEMAGICK_PATH."composite picA.jpg -geometry +200+0 picB.jpg picAB.jpg");
I also tried the same with "-size 400x300" after "composite" but nothing happens. Problem is that the image picA.jpg is moved 200px and merged into picB.jpg, but the width of picAB.jpg is the same as picB.jpg is.
I'm also not sure if "-geometry" is the correct command.
Maybe you'll find the montage
method easier to understand (this is probably what you had in mind when you tried it with composite
-- but that one is for overlapping images, not for side-by-side montage...)
montage \
-background '#FFF9E3' \
-geometry 200\!x\> \
-gravity west \
right+narrow.jpg \
left+wider.jpg \
result.jpg
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With