Grayscale Selections
Sven Langkamp
sven.langkamp at gmail.com
Sat Jul 16 20:46:31 CEST 2011
On Sun, Jul 3, 2011 at 11:33 AM, Cyrille Berger Skott
<cberger at cberger.net>wrote:
> 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.
>
Try that but I didn't get it to work, see attachment. Is that what you
suggested?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kimageshop/attachments/20110716/152efe2c/attachment.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gray2.diff
Type: text/x-patch
Size: 3092 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kimageshop/attachments/20110716/152efe2c/attachment.diff
More information about the kimageshop
mailing list