Painting on selections and selection masks

Cyrille Berger Skott cberger at cberger.net
Sun Oct 30 16:59:35 UTC 2011


On Sunday 30 October 2011, Boudewijn Rempt wrote:
> On Saturday 29 October 2011 Oct, Cyrille Berger Skott wrote:
> > On Saturday 29 October 2011, Boudewijn Rempt wrote:
> > > On Saturday 29 October 2011 Oct, Cyrille Berger Skott wrote:
> > > > There is no problem for Krita to handle pre-multiplied colorspaces,
> > > > since a premultiplied RGBA, is actually defined as (a*R, a*G, a*B,
> > > > a). And if there is such an assumption, it is a bug ;) It would mean
> > > > that somewhere Krita makes assumption about the color data.
> > > 
> > > It's either a bug, or a design decision that permeates all our code.
> > > Either way, it's not feasible to refactor, redesign or fix for 2.4.
> > 
> > Do we even have any attempt at a premultiplied color space ? That is the
> > first time I hear it... If so, can I have a look at the code ?
> 
> No, but in fact, the gray-without alpha colorspace could be seen as a
> colorspace with pre-multiplied alpha. But there's no way it's going to
> work.
That I agree, because it is a premultiplied alpha colorspace where the alpha 
channel information has been lost, and that is never going to work.
 
> > > * we are talking about a 2 year old critical bug
> > > * we are one month away from the final release
> > > 
> > > * we have tried the following solutions:
> > > 	* fix the gray colorspace
> > > 	* fix he alpha colorspace
> > > 	* special case dab creation
> > > 	* patch over the difference in design assumptions inside KisSelection
> > > 
> > > * everything failed except the last attempt, which has its
> > > disadvantages * we cannot do a big refactoring of pigment or all of
> > > Krita in time for the release.
> > 
> > Sure... So what did you expect from your email ? Do you need help fixing
> > the patches ?
> 
> No, I can do that myself, the changes are pretty simple, with the only
> tricky bit being the extent calculation of KisPixelSelection after
> changing it from alpha to gray + alpha.
> 
> What I had hoped for was that people would have tried to a) understand what
> I was trying to do instead of immediately just opposing it b) see whether
> there is any other way of solving the issue.
>
> To me, it is clear that there is no other solution: we cannot realistically
> fix pigment to use multi-channel colorspaces as masks and we cannot fix
> krita to work with colorspaces without an alpha channel.

Not for 2.4, that I agree. Which means that for 2.4, your solution is probably 
the best we can do.

-- 
Cyrille Berger Skott


More information about the kimageshop mailing list