I need to change the opacity or alpha of my image based on a float variable from 0.0 to 1.0.
0 = transparent, 0.5 = half transparent and 1 = opaque.
This is a classic function that you find in many softs and also Imagic for PHP. See: http://www.php.net/manual/en/imagick.se ... pacity.php
I can't seem to find how to do it with the command line tool "convert".
Here is what I tried:
$> convert logo.png -alpha on -channel A -evaluate divide 3 result.png
This works fine but as I do a "divide" I can't reach 0 and create full transparency. It also hard for me to translate my input variable 0>1 to the proper division factor.

$> convert logo.png -alpha on -channel A -evaluate set 30% result.png
This sounded great! ... However the quality obtain is not. The color is bleeding, I get a black BG and the quality is not good at all. See below:

Do you guys have a solution for me?
I need to be able to convert my float input variable 0>1 to a parameter that "convert" will understand to perform transparency.
Thanks a lot!
Koxon