Page 1 of 1

Re: Make conv of grays to different level of transp faster

Posted: 2008-07-22T10:27:30-07:00
by fmw42
try

convert image.png \( +clone -contrast-stretch 0 \) +matte -compose copy_opacity -composite result.png

+clone copies your image to use for the alpha channel
-contrast-stretch 0 will make your alpha channel graylevels become 0 to 255
-compose copy_opacity -composite will add the alpha channel to the image