Ugh... Qt4 porting

Mosfet dan.duley at
Mon May 16 17:58:32 BST 2005

On Monday 16 May 2005 11:14 am, Zack Rusin wrote:
> On Monday 16 May 2005 11:35, Mosfet wrote:
> > Lars wrote:
> > > I said the math behind it is trivial. And yes, I do think that
> > > changing code to handle the premultiplied values instead of non
> > > premultiplied ones should in almost all cases be not too hard.
> >
> > Except it doesn't really work, as has been pointed out ;-)
> And Lars pointed out, if you convert back and forth anyway then 8bit
> precision is not enough in the first place.

Which is why it doesn't work and should be unsupported and not converted...

> > This is how I see things: You have an image format that is really
> > fast with a paint device and XRender but that modifies the pixel
> > values in a way that looses precision getting original RGB values
> > back.
> And again, as Lars pointed out the loss resulted from this will not
> result in something that is visually different.

Tell that to someone using KImageEffect for an image editor.

> > And I still want my create()
> As pointed out to you, it's really useless.

I explained why it wasn't. Read the archive of this list.

> > and jumpTable() methods back,
> That's even more.

Again, wrong. It's sometimes quite useful to be able to index by row and 
column. For example, interpolation: This uses an inline class that takes the 
pixel at any position and interpolates it with it's neighbors. It's faster to 
use a jump table, taking a one time hit, and then a double array index than 
it is to do pointer arithmetic for each pixel.

> > and
> > possibly a pointer to the colorTable QVector data so you don't have
> > to use copies ;-)
> Where's that an issue?

You know, I am getting a little tired of me explaining things over and over 

Your the KImageEffect maintainer - you port it. I've posted updated tarballs 
that work with KDE3 QImage before on kde-graphics. I've put a shitload of 
effort into this stuff and am getting a lot of trouble from people who quite 
frankly don't know what the hell they are talking about:

First premultiplying the pixels doesn't matter to graphics algorithms. I point 
out it does. Then it matters but is easy to write two versions of everything. 
Then it's pointed out converting the pixels will loose color resolution. Then 
it's said that's okay but your crazy if you think people are going to be okay 
with their image editors truncating colors. On other topics I point out it's 
useful to construct an image then create it later, and I'm told I'm wrong. I 
point out jumptables are useful and I'm told I'm wrong. Stuff that total is 
probably less than 20 lines in QImage,

Screw this crap.

> Zack

More information about the kde-core-devel mailing list