Darken with Opacity Effects for Single Image

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
Posts: 62
Joined: 2017-12-27T06:13:59-07:00
Authentication code: 1152

Darken with Opacity Effects for Single Image

Post by mjamal » 2018-01-04T02:38:24-07:00

Hello Team,

Can anyone please let me know how can I use the layers as "DARKEN" and Opacity as 30% for any image from Imagick functions?
NOTE: Need to change the above two effects for a single image only.

Please see the attached image from photoshop for reference.
2018-01-04_1507.png (19.33 KiB) Viewed 7058 times

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

Re: Darken with Opacity Effects for Single Image

Post by snibgo » 2018-01-04T05:31:36-07:00

I don't use PS, but it's probably something like this (Windows BAT syntax):

Code: Select all

convert ^
  inA.png ^
  ( inB.png -channel A -evaluate Multiply 0.3 +channel ) ^
  -compose Darken -composite ^
snibgo's IM pages: im.snibgo.com

Post Reply