About vectorization and planar channels in Krita
martinxyz at gmx.ch
Sat Oct 27 19:43:21 UTC 2012
On Thu, Oct 25, 2012 at 04:18:09PM +0200, Boudewijn Rempt wrote:
> On Wednesday 24 October 2012 Oct, Andre Gemuend wrote:
> > I just wanted to say that this is a disadvantage of non-premultiplied alpha. You actually
> > divide out the new alpha value from the new colors, because the result of the composition is by
> > definition a color premultiplied with alpha.
> > Moreover, you do this for every composition, iow a pixel undergoes N divisions,
> > whereas in the premultiplied case you would only have one division at the very last step, iff
> > you really need the non-premultiplied value. Its also much easier to implement with premultiplied alpha.
> The previous maintainer of Krita always intended to make Krita work with
> pre-multiplied alpha -- but I never really understood how to make that
> properly work given lots of independent layers. I don't think other open
> source graphics apps use pre-multiplied alpha either, but I'm not
> completely sure of that. Do you know of one?
Using premultiplied alpha as an image model doesn't seem to be very common,
but MyPaint does it. I mentioned it in this (very old) blogpost:
What I like: when you do all the math premultiplied, you are not tempted to
use color information that is barely visible (e.g. un-erasing, and you will
think twice about picking a color from an almost transparent layer).
The main drawback is that save/load always is un-premultiplied, and you
cannot roundtrip the invisible colors. And some color transformations
become harder (you have to un-premultiply first and come up with some random
color if the alpha is zero).
More information about the kimageshop