destination overlay transparent

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
dicko
Posts: 1
Joined: 2011-05-24T02:28:11-07:00
Authentication code: 8675308

destination overlay transparent

Post by dicko »

Hi all,

In Paint Shop Pro you can add a layer, set its blend mode to Overlay and make the layer not 100% opaque.
Is something similar possible in IM?

I allready got a result using

Code: Select all

convert lightandshadow.png floor.png -compose Overlay -composite result.png
but I would like to make the destination 50% transparent.

Does anyone have an idea?
Thanks.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: destination overlay transparent

Post by fmw42 »

if you want the result.png image to be 50% transparent, then

convert lightandshadow.png floor.png -compose overlay -composite -alpha set -channel a -evaluate set 50% +channel result.png

But I be sure you have your two images in the right order

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

Re: destination overlay transparent

Post by anthony »

That is the method to use. "composite" can't do multiple operations on images, so you will need to use convert.

NOTE however that Overlay composition is NOT the same as Over composition. Over being more typically what is wanted in 'blend/dissolve' image merging. Overlay is a lighting mode and typically not used with 'transparency blending'

This is true of either IM or in Photoshop!

I suggest you read IM examples, Composing Images.
http://www.imagemagick.org/Usage/compose/
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply