[Qt-interest] QImage and ARGB32_Premultiplied
Mihail Naydenov
mlists at ymail.com
Mon Jan 31 09:00:13 CET 2011
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
>
More information about the Qt-interest-old
mailing list