<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Aug 2, 2016 at 3:56 PM, marcel.taeumel <span dir="ltr">&lt;<a href="mailto:Marcel.Taeumel@hpi.de" target="_blank">Marcel.Taeumel@hpi.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi, there.<br>
<br>
In Color class &gt;&gt; colorFromPixelValue:depth: we have:<br>
<br>
...<br>
d = 32 ifTrue: [<br>
                &quot;eight bits per component; 8 bits of alpha&quot;<br>
                r := (p bitShift: -16) bitAnd: 16rFF.<br>
                g := (p bitShift: -8) bitAnd: 16rFF.<br>
                b := p bitAnd: 16rFF.<br>
                alpha := p bitShift: -24.<br>
                alpha = 0 ifTrue: [^Color transparent].<br>
                (r = 0 and: [g = 0 and: [b = 0]])  ifTrue: [^Color transparent].<br>
                alpha &lt; 255<br>
                        ifTrue: [^ (Color r: r g: g b: b range: 255) alpha: (alpha asFloat /<br>
255.0)]<br>
                        ifFalse: [^ (Color r: r g: g b: b range: 255)]].<br>
...<br>
<br>
This denotes black to transparent. Is this still right?<br></blockquote><div><br></div><div>It was never &quot;right&quot; but a hack ... Some code treats the pixel value 0 to mean &quot;transparent&quot;. In particular (IIRC) 16 bit forms which do not store an alpha value, and 32 bit forms that don&#39;t have a proper alpha channel. So they use 0,0,0 to mean &quot;transparent&quot; and &quot;0,0,1&quot; for solid black.</div><div><br></div><div>I don&#39;t think there&#39;s a good reason for this anymore, since we do have enough memory and computation power to do alpha properly. But since it will break some code I&#39;d suggest starting to fix it only after this release.</div><div><br></div><div>- Bert - </div></div></div></div>