[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: Ugh... Qt4 porting
From: Mosfet <dan.duley () verizon ! net>
Date: 2005-05-16 12:55:30
Message-ID: 200505160755.30321.dan.duley () verizon ! net
[Download RAW message or body]
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 ;-)
>Lars wrote:
...snip...
>> 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
>one.
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? Even simple things like the
gray level would be wrong. A red value of 25 may actually be 100 but with
1/4th the opacity. Most effects won't work properly with this.
>> 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.
We promote images to 32bpp when we have to but generally do not do things that
require a lot of conversion, for example we don't do effects on 1bpp images
by promoting them. I guess it would depend on how often it is used. Doing so
will kill performance, and in such cases the approach has been that it's
better to warn the developer.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic