Page 1 of 1

Re: adding transparency to grayscale images?

Posted: 2007-07-27T04:43:22-07:00
by glennrp

Code: Select all

convert input.png -negate alpha.png
composite -compose copyopacity alpha.png input.png -depth 8 output.png
This results in an RGBA png file. I can't figure how to force Gray-alpha output,
so I use

Code: Select all

    pngcrush -c 4 output.png gray-alpha.png
afterwards if I need gray-alpha.