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

Darken with Opacity Effects for Single Image

Post by mjamal »

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
2018-01-04_1507.png (19.33 KiB) Viewed 11100 times
snibgo
Posts: 12159
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 »

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 ^
  out.png
snibgo's IM pages: im.snibgo.com
Post Reply