I got this one wrong, in a way which busts conversion to .ico's when
there is an alpha channel.
I said:
> So around line 997 where we have
>
> if (next->matte == MagickFalse)
> *q++=ScaleQuantumToChar(255);
> else
> *q++=ScaleQuantumToChar(p->opacity);
>
> I think the last line should be
> *q++=ScaleQuantumToChar(255 - p->opacity);
but in fact it should be
*q++=ScaleQuantumToChar(QuantumRange - p->opacity);
255 is of course a char value, but we are converting from a Quantum
*to* a char.
I've tested this change on some more real world examples.
One thing I still don't understand, though, is the *q+
+=ScaleQuantumToChar(255) line, which seems like it should then be
"*q++=ScaleQuantumToChar(QuantumRange)" Perhaps in the next->matte ==
MagickFalse, the particular value is unimportant, though I've not
tested that.
Sorry for the confusion!
-Matt
_______________________________________________
Magick-bugs mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-bugs