Crop image using a black/white mask
Posted: 2011-04-28T02:00:47-07:00
Hi everyone.
I have 2 png images of the same size and one of them is a mask: a white circle in the center with every other pixels black.
I would like to obtain a cropped image with the original one substituting the white circle and with the other pixels black.
I've tried with this tutorial, typingbut I've obtained an image equal to the mask.
Have you got any suggestions?
Thanks in advance!
I have 2 png images of the same size and one of them is a mask: a white circle in the center with every other pixels black.
I would like to obtain a cropped image with the original one substituting the white circle and with the other pixels black.
I've tried with this tutorial, typing
Code: Select all
convert mask.png orig.png -compose ChangeMask -composite cropped.png
Have you got any suggestions?
Thanks in advance!