Fill alpha channel with a constant?
Fill alpha channel with a constant?
Hi, is there a quick way to fill an image's alpha channel with a constant? -fx and -recolor are overkill and are quite slow. i would like to do what -dissolve does but 'convert' doesnt support it. thanks
Re: Fill alpha channel with a constant?
I've just noticed there is a -compose operator, copy-opacity, which might work. I would have to create a canvas using xc:, with a solid color and the required opacity and the size of the image whose alpha channel I want to set, and composite it onto the image with copy-opacity. The downside is I need to know the size of the image in advance which is really a pain... oh well back to the documentation
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Fill alpha channel with a constant?
Easy way is to just set all that channels values...
will replace all alpha/matte channel values with a 50% transparency.
Code: Select all
-channel A -evaluate set 50% +channel
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/