Re: Composite transparent layer and underlying layer
Posted: 2016-02-26T18:56:32-07:00
If we do that, it would distort either the background image or the frame image. If you want to do the frame image, then you can always distort it perfectly to match the background image.
try
If the two images' aspect ratios are different, you will have to distort one or the other. There is no way to make them fit without distortion, unless you crop or pad as the code I provided earlier.
try
Code: Select all
background="Ah4mtPw.jpg"
frame="mo9LQCx.gif"
size=`convert $background -format "%wx%h" info:`
convert $background \( $frame -resize $size! \) -gravity center -compose over -composite result.png
If the two images' aspect ratios are different, you will have to distort one or the other. There is no way to make them fit without distortion, unless you crop or pad as the code I provided earlier.