Page 1 of 1
Fill alpha channel with a constant?
Posted: 2007-10-08T01:56:25-07:00
by rling
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?
Posted: 2007-10-09T23:40:05-07:00
by rling
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
Re: Fill alpha channel with a constant?
Posted: 2007-10-15T23:14:01-07:00
by anthony
Easy way is to just set all that channels values...
Code: Select all
-channel A -evaluate set 50% +channel
will replace all alpha/matte channel values with a 50% transparency.