Set blending mode as "screen" and opacity to 50%

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
mjamal
Posts: 36
Joined: 2017-12-27T06:13:59-07:00
Authentication code: 1152

Set blending mode as "screen" and opacity to 50%

Post by mjamal » 2018-08-13T03:19:16-07:00

Hello Team,

Can any one please let me know how can I do the below operation for a single PNG image in Imagick / ImageMagick?

"Set blending mode as "screen" and opacity to 50%"

Note: I did that with the two different images using "compositeImage" Imagick function but in this I need two layers/Images and now I need to do the mentioned setting in single PNG or any other type Image.

Thanks in advanced.

snibgo
Posts: 10838
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Set blending mode as "screen" and opacity to 50%

Post by snibgo » 2018-08-13T04:01:22-07:00

At the command line, use "-compose Screen". In IMagick, the mode is a parameter of the compositeImage() function. See http://phpimagick.com/Imagick/compositeImage

To set opacity to anything, use "-evaluate set" at the command line, and evaluateImage() in IMagick.
snibgo's IM pages: im.snibgo.com

mjamal
Posts: 36
Joined: 2017-12-27T06:13:59-07:00
Authentication code: 1152

Re: Set blending mode as "screen" and opacity to 50%

Post by mjamal » 2018-08-13T04:35:43-07:00

Hello Snigbo,
I have used and checked both the Imagick functions.
I need to know how to Set blending mode as "screen" for a single image because the sample link is used two different images and same I already used with two images.
Please suggest if I can used "Screen" blending more with one image?

snibgo
Posts: 10838
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Set blending mode as "screen" and opacity to 50%

Post by snibgo » 2018-08-13T04:44:29-07:00

mjamal wrote:I need to know how to Set blending mode as "screen" for a single image...
I don't know what that means. If you set a blending mode for a single image, what do you expect to happen? Do you expect that this will change the image somehow?
snibgo's IM pages: im.snibgo.com

mjamal
Posts: 36
Joined: 2017-12-27T06:13:59-07:00
Authentication code: 1152

Re: Set blending mode as "screen" and opacity to 50%

Post by mjamal » 2018-08-13T05:11:36-07:00

Not sure what will happen if applying blending mode as "screen" on single image.
I think there will be no effect on single image if applying blending mode as "screen".

Post Reply