Page 1 of 1
image masking effect.
Posted: 2009-04-17T02:58:27-07:00
by ncm123
Hi,
I am trying to get this effect done. where user uploads image 1, then i process and generate- image 3.
How to do this? Can anyone help!
Thanks!
Re: image masking effect.
Posted: 2009-07-21T13:21:20-07:00
by emery
Roughly
Code: Select all
$draw = new ImagickDraw();
$draw->ellipse(...);
$mask = new Imagick(...);
$mask->drawImage($draw);
$obamaImage->compositeImage($mask, Imagick::COMPOSITE_DSTIN, 0, 0);
Re: image masking effect.
Posted: 2009-08-06T18:49:41-07:00
by anthony
If you just want to make the white areas of the mask white, compose with "Screen"
See Mathematical Masking
http://www.imagemagick.org/Usage/channels/#compose
Re: image masking effect.
Posted: 2009-08-17T13:01:23-07:00
by Portnoy
Is it possible to use screen to mask a binary Group4 tiff image with another binary group4 with the same resolution, dimensions? I am trying to block out portions of a form on a scanned image by creating a tiff with black boxes over the areas I want to expose and using that as a mask over the original image. The synatx I used is
>convert form.tif mask.tif compose -screen output.tif
It does produce the output.tif but all I get is whatever image is listed first. There is no masking of the form image.
Any help would be appreciated.
Re: image masking effect.
Posted: 2009-08-17T21:56:28-07:00
by anthony
You need a
-composite operator (or other) to apply the
-compose setting! also you forget the '-' for -compose!
Actually your output was probaly a multiple image TIFF with BOTh the original images in it. You should have has errors like "no such file" for "compose" and "screen"!!!
here is what you meant to use...
Code: Select all
convert form.tif mask.tif -compose -screen -composite output.tif
Re: image masking effect.
Posted: 2009-08-18T17:28:48-07:00
by Portnoy
You are correct. I did receive a multipage tiff of the original images. Thank you for the proper command string. After much experimentation I was also able to produce the desired effect by using composite intead of convert so the command line looked like
>composite overlay.tif background.tif -compose screen output.tif
Thanks again.