Page 1 of 1
what's using of "-mask filename" in convert?
Posted: 2009-02-06T20:55:34-07:00
by haibara
i found its explanation - Composite the image pixels as defined by the mask.
what's the meaning? filter a image according to a specified mask?
regards
Re: what's using of "-mask filename" in convert?
Posted: 2009-02-06T21:10:26-07:00
by fmw42
haibara wrote:i found its explanation - Composite the image pixels as defined by the mask.
what's the meaning? filter a image according to a specified mask?
regards
see
http://www.imagemagick.org/Usage/compose/#compose
it allows the mask to control where two images are composited over each other or using other -compose settings
Re: what's using of "-mask filename" in convert?
Posted: 2009-02-07T11:32:34-07:00
by haibara
does cmd like this?
convert [overlay] [background] -mask [mask] [result]
i find strange result, only get [overlay] and [background] in [result] name again, [mask] seems no effect
how to create a specified color image whose size as a specified image?
convert [source] -fill [#rgb hex] -draw 'color 0,0 reset' [result] donesn't work, why?
Re: what's using of "-mask filename" in convert?
Posted: 2009-02-07T19:48:36-07:00
by fmw42
haibara wrote:
does cmd like this?
convert [overlay] [background] -mask [mask] [result]
i find strange result, only get [overlay] and [background] in [result] name again, [mask] seems no effect
how to create a specified color image whose size as a specified image?
convert [source] -fill [#rgb hex] -draw 'color 0,0 reset' [result] donesn't work, why?
I am not familiar with -mask. To composite with a mask the command syntax is:
convert backgroundimage overlayimage maskimage -compose somecomposemethod -composite resultimage
see -compose methods at
http://www.imagemagick.org/Usage/compose/
To create an image of a specific size and color:
convert -size WidthxHeight xc:"color" resultimage
where Width and Height are the size of the resultimage and "color" can be any colorname or color defined in RGB or Hex. see
http://imagemagick.org/script/color.php
Re: what's using of "-mask filename" in convert?
Posted: 2009-02-07T21:54:24-07:00
by haibara
fmw42 wrote:
I am not familiar with -mask. To composite with a mask the command syntax is:
convert backgroundimage overlayimage maskimage -compose somecomposemethod -composite resultimage
see -compose methods at
http://www.imagemagick.org/Usage/compose/
To create an image of a specific size and color:
convert -size WidthxHeight xc:"color" resultimage
where Width and Height are the size of the resultimage and "color" can be any colorname or color defined in RGB or Hex. see
http://imagemagick.org/script/color.php
in fact, i always use convert [background] [overlay] [mask] -compose [result]
when i find -mask, i only want to know what's this. via some tests, i still can't understand its effect, so i post.
about 2nd queston,
i want to create a specified color image whose size as a specified image. here i don't know image size, new image size comes from a specified image
now i find convert [source] -fill [rgb] -colorize 100% [result] can work
other resolution?
Re: what's using of "-mask filename" in convert?
Posted: 2009-02-08T22:10:21-07:00
by anthony
The better idea is to look at the actual masked examples at
http://www.imagemagick.org/Usage/compose/#mask
You do NOT use
-mask which is a clipping mask not a composition mask.
Actually I have not figured out using -mask as yet
However I do believe it defines a limiting region in which changes can occur.
It may also be restricted to being a simple boolean mask. I have not experimented enough to know for certain.