[Qt-interest] QImage and ARGB32_Premultiplied
Joshua Grauman
jnfo-c at grauman.com
Mon Jan 31 18:35:59 CET 2011
IMHO, maybe it would be a good idea to add new composition mode(s) for
this. This would be a good upgrade path for people dependent on
setAlphaChannel.
Josh
> I didn't knew setAlphaChannel is deprecated. This is unfortunate.
>
> Do you know way it is deprecated? Because I dont see a way to mimic its effect
> without iterating the pixels manually.
>
> I other words - what composition mode will apply a grayscale (Indexed8) src
> image to the alpha of a ARGB32(_Premultiplied) dest image?
>
> Thanks
> MihailNaydenov
>
>
>
> ----- Original Message ----
>> From: Thiago Macieira <thiago at kde.org>
>> To: qt-interest at qt.nokia.com
>> Sent: Sun, January 30, 2011 1:12:26 AM
>> Subject: Re: [Qt-interest] QImage and ARGB32_Premultiplied
>>
>> On Saturday, 29 de January de 2011 14:41:14 Joshua Grauman wrote:
>>> 1) If I have one QImage that is ARGB32_Premultiplied and one that is
>>> ARGB32, if I assign one into the other (ie. image1=image2), will QImage do
>>> the conversion for me?
>>
>> No. The two images will be equal (QImage is implicitly shared). They will be
>> both of the same format, with the exact same pixel content.
>>
>>> 3) Seeing that setAlphaChannel() is deprecated, what is the fastest way to
>>> set the alpha channel to a single value for an entire image (for an
>>> ARGB32_Premultiplied QImage). Do I have to iterate over each pixel and
>>> calculate/set the premultiplied values?
>>
>> Probably by blending with another image that has an alpha channel. Iterating
>> would be slower than doing the blend.
>>
>> --
>> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
>> Senior Product Manager - Nokia, Qt Development Frameworks
>> PGP/GPG: 0x6EF45358; fingerprint:
>> E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
>>
>
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>
More information about the Qt-interest-old
mailing list