as I understand it, 'lighten' should return the maximum of the given values. In the following example I combine the alpha channel of a small square with color rgba(255,0,0,200) and a big square with color rgba(255,0,0,100). The resulting graphic has a transparency of 222 (and not max(100,200)=200) in the inner square. Looks like a bug to me.
Debian 6.0.5 -32bit, IM 6.6.0-4
Code: Select all
#!/bin/bash
convert -depth 8 -size 100x100 xc:'#FF0000C8' one.png
convert -depth 8 -size 200x200 xc:'#FF000064' two.png
convert \( -channel Opacity two.png \) \
\( -gravity center -channel Alpha two.png one.png -compose lighten -composite \) \
\( -gravity center -compose copy_opacity -composite \) \
-depth 8 result.png
Windows 7 -64bit, IM 6.7.9-1
Code: Select all
convert -depth 8 -size 100x100 xc:"#FF0000C8" one.png
convert -depth 8 -size 200x200 xc:"#FF000064" two.png
convert ( -channel Opacity two.png ) ^
( -gravity center -channel Alpha two.png one.png -compose lighten -composite ) ^
( -gravity center -compose copy_opacity -composite ) ^
-depth 8 result.png
