0

I'm coming up empty handed while trying to find out how to modify the opacity of an image using the GraphicsMagick CLI. I'm simply trying to input a standard image and convert it to the corresponding image with a reduced opacity. I'm running GraphicsMagick 1.3.14. Using ImageMagick, I can issue the command:

convert input.png -alpha set -channel a -evaluate set 50% +channel output.png

However, the -alpha option (among others) is unrecognized as a valid GM convert option (convert option reference here). Any help would be greatly appreciated.

Note: This question is a cross post of a question on StackOverflow. After posting on SO, I thought SuperUser might be a little more appropriate.

1 Answer 1

2

The equivalent in GraphicsMagick is

gm convert input.png -operator Opacity Multiply 0.5 output.png

or

gm convert input.png -operator Opacity Assign 50% output.png

depending on what you really want to do (modulate or assign).

You should add -matte prior to -operator if you don't know if the image already has an active opacity channel.

Bob

2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .