Fix GIF image decoding: do not zero transparent pixels
authoraavit <eirik.aavitsland@digia.com>
Wed, 7 Nov 2012 14:19:20 +0000 (15:19 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 9 Nov 2012 15:07:51 +0000 (16:07 +0100)
commitd91c1422a9d0b96172fb13da5a179688b590d125
tree9aff422dd03654899306ec0f7099a4c268881a6d
parentf4a8e940eda1904ed2fba247c1d2752106ccc5c9
Fix GIF image decoding: do not zero transparent pixels

For the special transparent color index, the decoder would skip
writing anything out (thus leaving the pixels at 0 rgba value).
Although correct for later frames, for the initial frame this would
loose the color information for such pixels (which one otherwise
could have made visible e.g. by converting then image to an
alpha-less image format).

Change-Id: I316cefce8f21797feedebfbf98296ad84eaa4b99
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
(cherry picked from qt/c309d424f45dc0e7b62fbbbabf20dbfe355f48a7)
Reviewed-by: aavit <eirik.aavitsland@digia.com>
src/gui/image/qgifhandler.cpp
tests/auto/gui/image/qimagereader/images/trans.gif [new file with mode: 0644]
tests/auto/gui/image/qimagereader/tst_qimagereader.cpp