image masking effect.
image masking effect.
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.
Roughly
Code: Select all
$draw = new ImagickDraw();
$draw->ellipse(...);
$mask = new Imagick(...);
$mask->drawImage($draw);
$obamaImage->compositeImage($mask, Imagick::COMPOSITE_DSTIN, 0, 0);
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: image masking effect.
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
See Mathematical Masking
http://www.imagemagick.org/Usage/channels/#compose
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: image masking effect.
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.
>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.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: image masking effect.
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...
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
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: image masking effect.
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.
>composite overlay.tif background.tif -compose screen output.tif
Thanks again.