convert background.jpg -scale 600x400 \( portrait.jpg -scale 250x200^ -crop 250x200+0+0 \) -geometry +300+150 -composite result.jpg
So the resulting portrait is 250x200 pixel big and placed at X=300 and Y=150. Now i want to place the portrait behind a PNG-background with a transparent part at the portraits posititon. So the background is somehow like a frame but at the same position.
Here is an example:
click on the picture for full size
So i if i change the command like this, it gets all messed up and i have no idea why:
convert background.jpg -scale 600x400 \( portrait.jpg -scale 250x200^ -crop 250x200+0+0 \) -geometry +300+150 +swap -composite result.jpg
the resulting image just shows the portrait with it's final size of 250x200. I also tried
Code: Select all
convert background.png -scale 600x395 \(
portrait.jpg -scale 250x200^ -crop 250x200+0+0 -geometry +300+150
\) +swap -composite result.bmp
edit:
This would work, but it seems to me like a strange workaround:
Code: Select all
convert background.png -scale 600x400 \(
-clone 0 \(
/home/cosmocard/cc_temp/portraits/4.jpg -scale 250x200^ -crop 250x200+0+0
\) -geometry +300+150 -composite
\) +swap -composite result.bmp