Make QWebpHandler::write() work on big endian systems stable v5.3.1
authorDmitry Shachnev <mitya57@gmail.com>
Thu, 29 May 2014 06:58:33 +0000 (10:58 +0400)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 4 Jun 2014 13:10:37 +0000 (15:10 +0200)
commit1c66c5786c35a7d841e0004757cff06da3f9a2cc
tree2769dc9c221f35b2c562552db6bcd92ffc482134
parentbcc7909dfe9d89f793919bc96abdfd6b704c4c0e
Make QWebpHandler::write() work on big endian systems

Currently, we convert image to Format_ARGB32. This means that on big
endian systems the order of bytes will be (0xAA, 0xRR, 0xGG, 0xBB).
However, in WebP library there is no function to import bytes in
ARGB format.

This commit makes us use Format_RGBA8888 and WebPPictureImportRGBA
on big endian systems, which will make the function work correctly.

Change-Id: I5f347f3ec66f0a57df0d40d4900b1573f9400506
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: aavit <eirik.aavitsland@digia.com>
src/plugins/imageformats/webp/qwebphandler.cpp