Grayscale Selections
Cyrille Berger Skott
cberger at cberger.net
Sun Jul 3 11:33:06 CEST 2011
On Saturday 02 July 2011, Sven Langkamp wrote:
> On Sat, Jul 2, 2011 at 5:28 PM, Cyrille Berger Skott
<cberger at cberger.net>wrote:
> > On Tuesday 28 June 2011, Cyrille Berger Skott wrote:
> > > Alternatively, you need to refactor pigment, you have two paths:
> > > * huge refactoring: the alpha channel is seperated from the color
> > > space, and RGB and RGBA becomes the same class (or Gray and GrayA), in
> > > the paint device, the channel is added seperately, and when bitblt, we
> > > pass a seperate pointer to the alpha channel, that can be null or not
> > > (ie like the mask)
> > > * smaller solution: make it possible to create composite op that work
> > > across color spaces
> >
> > There is a third solution
> > * detect in KoColorSpace::bitBlt that the destination color space is the
> > same
> > as the source color space without alpha, and add an alpha channel to the
> > data
> > and then discard it, but that is not going to be performant.
>
> I thought about that too, but then you pratically need another paint device
> in grayscale colorspace than is used for a tempory bitBlt.
> Of course that means two bitBlt.
Well no. you can do it directly in KoColorSpace::bitBlt.
--
Cyrille Berger Skott
More information about the kimageshop
mailing list