how to crop an image with a mask
Posted: 2016-01-26T13:10:47-07:00
Hi everyone,
I'm trying to do a simple images process, but my level of english and programing is low and is hard for me understand the imagemagick guide. I reviewed Fred's ImageMagick Scripts and neither found any solution.
I want to cut an image with a mask. This is my flow program
1 receive the image to mask and it's size
2 place the mask in the position that i want over the image
3 apply the mask to cut the shape
4 merge the result in other image on the desire position
I want to extract only the shape of the mask. I move the mask because in my image the original is bigger or smaller that mask(the image size to mask will change dynamically ), in case the size of image and mask be the same i don't move nothing.
In this case the mask cut all rose, but some tome i want cut only a part of the rose, for that move the mask to area to crop.
What can i do?
P.D:
My O.S is ubuntu and imagemagick version is:
Version: ImageMagick 6.8.9-9 Q16 x86_64 2015-08-06 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules OpenMP
Delegates: bzlib djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png tiff wmf x xml zlib
I'm trying to do a simple images process, but my level of english and programing is low and is hard for me understand the imagemagick guide. I reviewed Fred's ImageMagick Scripts and neither found any solution.
I want to cut an image with a mask. This is my flow program
1 receive the image to mask and it's size
2 place the mask in the position that i want over the image
3 apply the mask to cut the shape
4 merge the result in other image on the desire position
I want to extract only the shape of the mask. I move the mask because in my image the original is bigger or smaller that mask(the image size to mask will change dynamically ), in case the size of image and mask be the same i don't move nothing.
In this case the mask cut all rose, but some tome i want cut only a part of the rose, for that move the mask to area to crop.
What can i do?
P.D:
My O.S is ubuntu and imagemagick version is:
Version: ImageMagick 6.8.9-9 Q16 x86_64 2015-08-06 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules OpenMP
Delegates: bzlib djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png tiff wmf x xml zlib