Layer image A over image B using grayscale mask from image C
Posted: 2017-02-03T13:52:10-07:00
I'm trying to perform a masking operation. I'd like to layer image A, which is a jpg, over image B, also a jpg, applying first an opacity mask in the form of a greyscale tif file to image A. I'm also rotating and scaling the mask as I load it. I'm able to create a png with transparency using this code:
but when i tie this together with the other image, the transparency does not seem to work:
Help! Thanks!
Code: Select all
convert \( images/010-Scan-005.jpg \( mask.tif[5002x6238] -rotate 180 \) -alpha Off -compose CopyOpacity -composite images_depaper/010-Scan-005.jpg.png
Code: Select all
convert \( images/014-Scan-007.jpg \( mask.tif[4982x6230] -rotate 180 \) -alpha Off -compose CopyOpacity -composite \) test.jpg -composite images_depaper/014-Scan-007.jpg