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 w
Here is a commandline to do the image appending due to the extended requirements, where the right picture should be offset by 200 pixels from the left edge, regardless of the (smaller) width of the left image:
convert \
-background '#FFF9E3' \
xc:none -resize 200x1\! \
right+narrow.png -append \
left+wider.png \
-gravity south \
+append \
-crop '400x +0+1' \
+repage \
result.png
The part xc:none -resize 200x1\!
creates a 1 pixel high, 200 pixels long line and vertically appends the smaller (right) image to it.
To this intermediate result the horizontally appending of the wider (left) image happens. We would now have a 401x100 picture with a maybe ugly line of transparent pixels on top.
That's why we shave off this top pixel line with the -crop
function.
You should be able to translate that into PHP yourself... :-)