Ugh... Qt4 porting

Lars Knoll lars at
Mon May 16 13:20:46 BST 2005

On Monday 16 May 2005 13:42, Mosfet wrote:
> Yeah, yeah, I know ;-) I was just a little ticked off because I finished
> porting, was writing the GUI test app, then figured I would update my
> snapshot to make sure it was still okay. Little did I know the QImage API
> was going to be totally different from beta2... They said there was going
> to be changes, but geez.
> Now I got to rewrite it again. I also had the old code pretty well tested
> and now I got to test everything again. That ticked me off more than
> anything because I am trying to make sure everything in KImageEffect works
> how it is supposed to. I'm spending more time now testing than actual
> coding :P
> I subscribed to the preview feedback list but haven't been approved yet.
> When I am I am at least going to ask for create() to return, (it's only a
> couple lines and right now the only way I can tell to allocate an empty
> image is assignment, which with shared data isn't horrible but still), the
> jump table to return, and perhaps allowing access to the image's colortable
> vector data pointer, (right now you can only get and set copies AFAIK).
> I'm also curious about what they are going to do with the new Premultiplied
> format. As far as I can tell it's a 32bpp format with the source part of
> the alpha already calculated. Good if your going to alphablend the image a
> lot, bad if you want to modify the original color channels. 

The image paint engine uses it. All drawing operations are a lot faster when 
using premultiplied alpha. It's also the format used by RENDER, so it matches 
fine there as well.

And I don't see why you shouldn't be able to modify the color channels in a 
premultiplied image more or less the same way then in a non premultiplied 

> Right now I just return if I get one of these.

QImage has a convertToFormat() method you could use: Convert to a format you 
can handle, and convert back at the end. Not fast, but maybe better than just 
not doing anything.


> Anyways, I haven't given up and am still doing this.
> > ..and Trolltech warned that this will happen. Actually, Qt has changed
> > again
> in certain aspects since Beta2.

More information about the kde-core-devel mailing list