Grayscale Selections

Cyrille Berger Skott cberger at cberger.net
Tue Jun 28 08:56:55 CEST 2011


On Tuesday 28 June 2011, Sven Langkamp wrote:
> On Sun, Jun 26, 2011 at 6:58 PM, Sven Langkamp 
<sven.langkamp at gmail.com>wrote:
> The problem is that we convert the to destination colorspace when bitBlt
> and by that the alpha channel gets lost. Any suggestions how that could be
> solved?

Well... this is basically why we use the alpha color space in the first 
place...

There is no easy solution with the current architecture of pigment, either use 
alpha color space, either use a grayscale color space with alpha channel as 
source and destination (but that is no good for memory).

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

-- 
Cyrille Berger Skott


More information about the kimageshop mailing list