Solution for the grayscale selections

Dmitry Kazakov dimula73 at gmail.com
Tue Sep 25 08:47:23 UTC 2012


> Well, you know what I think of this idea already, since we discussed it
> before
>
> For this problem I think there are two decent solutions:
>
> 1) make Krita work with premultiplied alpha colorspaces (i.e., colorspaces
> with no separate alpha channel). This is a lot of work, but it is the
> proper solution.
>

Well, "premultipled alpha" usually means not "colorspaces with no separate
alpha channel", but colorspaces stored in a form of (ra,ga,ba,a). If you
have no alpha channel at all, you will simply not be able to do
COMPOSITE_OVER, because it uses the source alpha even in premultiplied
case. Just mathematically. So the premultiplication will give us no help.


> 2) Finish what I started earlier and make the selection have graya
> colorspace that renders to a gray colorspace projection similar to the way
> we render a vector selection, that then is used as the selection


Aren't we fighting against the memory footprint of Krita and trying to
optimize our paint-ops which does already copy quite much memory that slows
it down?

If all the paint ops use paintingColorSpace() and *not* use colorSpace()
anywhere, then it will be consistent. And there are really few usecases of
applying color filters to the selections. If the filter cannot be even
theoretically applied to the selection, it's better to disable or fix it
than allow it to work through some additional devices and get illogical
results.

-- 
Dmitry Kazakov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kimageshop/attachments/20120925/18a7087a/attachment.html>


More information about the kimageshop mailing list