I think I've tracked down a bug in the way photoshop opacity layers are parsed.
There's been a discussion going on here:
viewtopic.php?f=1&t=15351
I think the issue is either the math to apply opacity layers has an inverted 0->QuantumRange setting, or it is overflowing incorrectly.
I'm still working out how to fix the issue, but will post my findings soon...
bug in photoshop opacity layers?
Re: bug in photoshop opacity layers?
Ok - here is my work around code, and I get the right results. I'm not 100% sure this is the correct fix since I don't understand the code all that well... hopefully this helps!
Previous line to take into account layer opacity:
q->opacity=(Quantum) (QuantumRange-(Quantum)
(QuantumScale*(q->opacity*layer_info.opacity)));
Changed line to take into account layer opacity:
q->opacity=(Quantum) (QuantumRange-(Quantum)
(QuantumScale*((QuantumRange-q->opacity)*(QuantumRange-layer_info.opacity))));
Thanks!
Previous line to take into account layer opacity:
q->opacity=(Quantum) (QuantumRange-(Quantum)
(QuantumScale*(q->opacity*layer_info.opacity)));
Changed line to take into account layer opacity:
q->opacity=(Quantum) (QuantumRange-(Quantum)
(QuantumScale*((QuantumRange-q->opacity)*(QuantumRange-layer_info.opacity))));
Thanks!
Re: bug in photoshop opacity layers?
We will get your patch into the next point release of ImageMagick. Thanks.