Photoshop blending mode "hard light"

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
sommerhit76
Posts: 2
Joined: 2013-04-22T04:49:24-07:00
Authentication code: 6789

Photoshop blending mode "hard light"

Post by sommerhit76 »

Is it possible to recreate the Photoshop blending mode "hard light" with ImageMagick?

Thanks for your input!
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Photoshop blending mode "hard light"

Post by snibgo »

Possibly with "-compose HardLight -composite".
snibgo's IM pages: im.snibgo.com
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Photoshop blending mode "hard light"

Post by Bonzo »

Try:

Code: Select all

composite input1.png input2.jpg -compose hard-light -matte output.jpg
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Photoshop blending mode "hard light"

Post by fmw42 »

Better to stick with the convert syntax

convert image1 image2 -compose hardlight -composite result

Note IM has most if not all the PS compose methods. see http://www.imagemagick.org/Usage/compose/
sommerhit76
Posts: 2
Joined: 2013-04-22T04:49:24-07:00
Authentication code: 6789

Re: Photoshop blending mode "hard light"

Post by sommerhit76 »

Thanks, "convert image1 image2 -compose hardlight -composite result" did the trick! :D
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Photoshop blending mode "hard light"

Post by fmw42 »

Note the image order is important for some compose methods and is swapped between composite and convert syntax.

see
http://www.imagemagick.org/Usage/compose/#compose
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Photoshop blending mode "hard light"

Post by anthony »

Also compose "Overlay" is the same as compose method "Hardlight" but with the source and destination images swapped.

Just remember it is the destination image (first image in "convert", second in "composite") that determines the final size of the image and the source of any other image meta-data (like profiles and comments).
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply