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

Casper Boemann cbr at boemann.dk
Thu Jun 16 12:11:26 CEST 2005


On Thursday 16 June 2005 12:09, Boudewijn Rempt wrote:
> 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.
That would only work one way wouldn't it?
-- 
best regards / venlig hilsen
Casper Boemann


More information about the kimageshop mailing list