Ugh... Qt4 porting
dan.duley at verizon.net
Mon May 16 16:22:19 BST 2005
I thought about this as well. This is excaberated by the fact that there is
only byte precision for each channel. If they were bigger you wouldn't run
into over/underflow as quickly.
Not all filters will be affected, but those that do probably will not support
this format. I'm not saying that the format should go, just that if your
going to be modifying images much you should definitely stick with the (A)RGB
On Monday 16 May 2005 10:00 am, Ingo Klöcker wrote:
> > The math behind is trivial: Instead of the value being R directly,
> > it's A*R. As long as you know it's premultiplied it should be trivial
> > to adjust your code to do the same effect.
> The problem is that the precision of the premultiplied values is less
> than the precision of the non-premultiplied values due to integer
> arithmetic being used. In general
> ( A*R ) / A != R
> So you can't recover the original values from the premultiplied values.
> Now if you do several iterations of this then the precision loss might
> increase dramatically
>c_manipulations). And this is far from being trivial math.
More information about the kde-core-devel