Two more functions for the colorstrategy?

Casper Boemann cbr at boemann.dk
Wed Aug 10 14:18:44 CEST 2005


On Wednesday 10 August 2005 13:59, Boudewijn Rempt wrote:
> On Wednesday 10 August 2005 13:51, Casper Boemann wrote:
> > > clearSelection does: MAX_SELECTED - selection alpha * device alpha
> > > applySelection does: selection alpa * device alpha / MAX_SELECTED
> >
> > how about:
> > screenWithSelect()
> > screenWithInverseSelect()
>
> Well -- it's not about the selection per se here, right?.
I think it is about selection.
so we have
-the alpha of the colorspace which is why we need to put it inside the 
colorspace
-and we have an external alpha coming from the selection

If the external selection could come from anywhere we wouldn't know the 
format. And do we ever need external alphas from somewhere else. (and not 
needing to convert colorspace anyway)

> It's about 
> computing with alpha, so wouldn't something like
>
> inverseAverageAlpha(Q_UINT8 * pixel, Q_UINT8 * alph2)
> averageAlpha(Q_UINT8 * pixel, Q_UINT8 * alph2)
>
> be better?
>
> Or maybe:
>
> mask (Q_UINT8 * pixels, Q_UINT8 * mask, Q_UINT32 nPixels)
> inverseMask (Q_UINT8 * pixels, Q_UINT8 * mask, Q_UINT32 nPixels)
>
I think Average would be a very wrong word. Mask is ok so:

maskWithSelect(Q_UINT8 * pixels, Q_UINT8 * mask, Q_UINT32 nPixels)
maskWithInverseSelect(Q_UINT8 * pixels, Q_UINT8 * mask, Q_UINT32 nPixels)

-- 
best regards / venlig hilsen
Casper Boemann


More information about the kimageshop mailing list