Ugh... Qt4 porting

Mosfet dan.duley at verizon.net
Mon May 16 14:58:52 BST 2005


Lars wrote:
>> Hi Lars! You guys really need to start CCing me. I'm not on the list so am
>> cutting and pasting responses from the mailing list archive ;-)
>
>How am I supposed to know?

I said it in this thread, I said it in the message you replied to, and you 
still didn't CC me >:)

...snip...

>> Because a pixel's RGB values aren't the actual RGB values, they are
>> averaged with the alpha value. So if your doing something like
>> interpolating a color you'd be interpolating with the wrong color, no? 
>
>As long as you don't take the premulitplication into account, yes. But it's 
trivial to do it right.
...snip...
>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.  

Okay, so I was right.

I don't even know if this deserves a response. This may be trivial to do this 
but without conversion it's a second set of a whole crapload of code to me 
and everyone else doing filters. "Doing it right" and natively using this 
format would mean two versions of most everything that accesses a pixel. 
Certainly it's a whole lot more work for me to add this than it is for you to 
keep existing functionality in QImage, no?





More information about the kde-core-devel mailing list