Alpha fixed to float (0-1), was: is alpha fixed to 8bit unsigned

Boudewijn Rempt boud at valdyas.org
Thu Jun 16 12:09:16 CEST 2005


On Thursday 16 June 2005 12:06, Grzegorz Borowiak wrote:
> On Thu, 16 Jun 2005, Boudewijn Rempt wrote:
> > What I propose as a solution is to define alpha in Krita outside
> > colorstrategies as a float with a range from 0 to 1, with 0 transparent
> > and 1 opaque. The colorstrategies can then convert the float value to
> > whatever floats their own boat.
>
> Keep in mind that conversion from float to int and vice versa is very
> CPU-consuming. Float alpha is reasonable only if other channels are also
> float - then it's fast. Otherwise it's damn slow.

Couldn't we use a lookup table for colormodels that don't need more than a 
byte for alpha? That should be fast enough, and relatively small.

-- 
Boudewijn Rempt 
http://www.valdyas.org/fading/index.cgi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kimageshop/attachments/20050616/fe939b82/attachment.pgp


More information about the kimageshop mailing list