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 » 2013-04-22T04:53:29-07:00

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

Thanks for your input!

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

Re: Photoshop blending mode "hard light"

Post by snibgo » 2013-04-22T05:42:24-07:00

Possibly with "-compose HardLight -composite".
snibgo's IM pages: im.snibgo.com

Bonzo
Posts: 2970
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Photoshop blending mode "hard light"

Post by Bonzo » 2013-04-22T08:44:23-07:00

Try:

Code: Select all

composite input1.png input2.jpg -compose hard-light -matte output.jpg

User avatar
fmw42
Posts: 24928
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Photoshop blending mode "hard light"

Post by fmw42 » 2013-04-22T10:05:47-07:00

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 » 2013-04-30T08:30:47-07:00

Thanks, "convert image1 image2 -compose hardlight -composite result" did the trick! :D

User avatar
fmw42
Posts: 24928
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Photoshop blending mode "hard light"

Post by fmw42 » 2013-04-30T10:12:03-07:00

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: 8882
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Photoshop blending mode "hard light"

Post by anthony » 2013-04-30T23:38:50-07:00

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