Review Request 110649: add kimgio WebP image format plugin

Fredrik Höglund fredrik at kde.org
Thu May 30 15:45:56 BST 2013



> On May 26, 2013, 2:15 p.m., Fredrik Höglund wrote:
> > kimgio/webp.cpp, line 58
> > <http://git.reviewboard.kde.org/r/110649/diff/1/?file=146351#file146351line58>
> >
> >     This is not particularly efficient. WebPDecodeBGRAInto() can decode directly into a QImage without using an intermediate buffer.
> 
> Martin Koller wrote:
>     As far as I understand the QImage documentation, I can not use this: "You cannot use the uchar* pointer directly, because the pixel format depends on the byte order on the underlying platform. Use qRed(), qGreen(), qBlue(), and qAlpha() to access the pixels."
>     
>     I understood it as: WebPDecodeRGBA() delivers always 4 consecutive bytes as RGBA, regardless of the endianess of the platform, but QImage::bits() returns a pointer to the data which contains the bytes in the order of the platform, which might be different than what WebPDecodeRGBA() delivers.

QImage uses a packed-pixel format where the components are packed in 32-bit words in ARGB order. It thus follows that the byte order is BGRA on little-endian, and ARGB on big-endian.

The WebP functions are array-based, so you have to use WebPDecodeBGRAInto() on little-endian and WebPDecodeARGBInto() on big-endian.


- Fredrik


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


On May 30, 2013, 10:11 a.m., Martin Koller wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/110649/
> -----------------------------------------------------------
> 
> (Updated May 30, 2013, 10:11 a.m.)
> 
> 
> Review request for KDE Runtime.
> 
> 
> Description
> -------
> 
> This patch adds support for the new Google invented WebP image format. See https://developers.google.com/speed/webp/?hl=ru
> 
> This is what was submitted before in https://git.reviewboard.kde.org/r/106300/ but it was suggested to move it to kde-runtime
> 
> 
> Diffs
> -----
> 
>   CMakeLists.txt 9f1f886 
>   kimgio/CMakeLists.txt PRE-CREATION 
>   kimgio/webp.cpp PRE-CREATION 
>   kimgio/webp.desktop PRE-CREATION 
>   kimgio/webp.h PRE-CREATION 
>   kimgio/webp.xml PRE-CREATION 
> 
> Diff: http://git.reviewboard.kde.org/r/110649/diff/
> 
> 
> Testing
> -------
> 
> some KDE apps, including read/write with a modified kolourpaint (to be able to change the quality)
> 
> 
> Thanks,
> 
> Martin Koller
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20130530/35fd6a9a/attachment.htm>


More information about the kde-core-devel mailing list