0

Given a RGB image :

enter image description here

Given a grey scale, opacity 0% to opacity 100% black image:

enter image description here

How to add the alpha shadows upon the RGB image using a shell command ? (preferemce for ImageMagick Convert)

Hugolpz
  • 17,296
  • 26
  • 100
  • 187

2 Answers2

1

I believe the example "Using Masks with Images" covers this. Simply disable the alpha channel, and copy over the second image as opacity composite. Add -negate option to invert the 0% ~ 100% opacity -- if needed.

 convert map_image.png elevation_mask.png \
         -alpha Off -compose CopyOpacity -composite \
         out.png

alpha mask

emcconville
  • 23,800
  • 4
  • 50
  • 66
1

I would compose the images using the Multiply operator. The command

convert src.png overlay.png -compose Multiply -geometry 948x630 -composite out.png

produces:

enter image description here

nwellnhof
  • 32,319
  • 7
  • 89
  • 113