Review Request: Support QImage::Format_ARGB8565_Premultiplied in KIconEffect::colorize

Christoph Bartoschek ponto at pontohonk.de
Tue Nov 24 23:05:56 GMT 2009



> On 2009-11-24 20:07:13, Christoph Feck wrote:
> > I do not really understand why "the image" suddenly is only 16 bit color, but it does not hurt to support those image formats, too. And probably should be backported.
> > 
> > What about the other KIconEffect methods? Or QImageBlitz?
> 
> Christoph Bartoschek wrote:
>     What do you mean by 16 bit color?
>     
>     The other methods only assume 1 bpp, 8 bpp or 32 bpp. I guess this is because Qt 4.0 only supported this formats. It would be major work to extend it for other formats.
>     
>     Who will ship it? I do not have any rights.
> 
> Christoph Feck wrote:
>     RGB565 = 5+6+5 bits = 16 bits of color information.
>     
>     You are right that earlier Qt 4 versions only supported image formats with 1, 8, and 32 bpp, that's why I am a bit surprised to see someone/something creating an RGB565 image in the first place. But probably comes from QPixmap::toImage().
>     
>     Anyway, I just looked at the other methods, and they call through KIEImgEdit, so they also should work with 16/24 bits now. For the other functions (overlay, double size etc.) we probably should just use Qt functions, but unless someone gives me a bug number, I feel too lazy :)
>     
>     Please close as submitted, I have commited as r1053871 and backported, thanks.

I see Format_ARGB8565_Premultiplied.  This means 8 additional bits of alpha.

Thanks


- Christoph


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/2273/#review3254
-----------------------------------------------------------


On 2009-11-24 12:09:18, Christoph Bartoschek wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/2273/
> -----------------------------------------------------------
> 
> (Updated 2009-11-24 12:09:18)
> 
> 
> Review request for kdelibs.
> 
> 
> Summary
> -------
> 
> I have a thin client where kdevelop crashes in kiconeffect.cpp:386 because it writes way behind allocated memory. The reason is that the image is of format QImage::Format_ARGB8565_Premultiplied but kiconeffect expects 32bit values here and not 24 bit. Therefore the data vector is only 3/4 of the expected size and colorize() starts to write after allocated memory finally resulting in the crash.
> 
> The fix converts everything that is not 32bit to a supported format.
> 
> 
> Diffs
> -----
> 
>   trunk/KDE/kdelibs/kdeui/icons/kiconeffect.cpp 1051650 
> 
> Diff: http://reviewboard.kde.org/r/2273/diff
> 
> 
> Testing
> -------
> 
> After patching kiconeffect.cpp kdevelop no longer crashes on the client.
> 
> 
> Thanks,
> 
> Christoph
> 
>





More information about the kde-core-devel mailing list