don't keep the transparent palette colour from the previous frame for the next one which may not have any transparency at all (#9747)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@54944 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-08-03 00:36:52 +00:00
parent 81b8e40161
commit 71fd0e9fa9
2 changed files with 7 additions and 7 deletions

View File

@@ -111,6 +111,7 @@ All (GUI):
- Fixed wrapping bug in wxRichTextCtrl when there were images present; - Fixed wrapping bug in wxRichTextCtrl when there were images present;
now sets the cursor to the next line after pressing Shift+Enter. now sets the cursor to the next line after pressing Shift+Enter.
- Fix crash when reading malformed PCX images. - Fix crash when reading malformed PCX images.
- Fix bug with wrong transparency in GIF animations (troelsk).
All (Unix): All (Unix):

View File

@@ -593,7 +593,7 @@ bool wxGIFDecoder::CanRead(wxInputStream &stream) const
wxGIFErrorCode wxGIFDecoder::LoadGIF(wxInputStream& stream) wxGIFErrorCode wxGIFDecoder::LoadGIF(wxInputStream& stream)
{ {
unsigned int global_ncolors = 0; unsigned int global_ncolors = 0;
int bits, interl, transparent, i; int bits, interl, i;
wxAnimationDisposal disposal; wxAnimationDisposal disposal;
long size; long size;
long delay; long delay;
@@ -655,7 +655,7 @@ wxGIFErrorCode wxGIFDecoder::LoadGIF(wxInputStream& stream)
} }
// transparent colour, disposal method and delay default to unused // transparent colour, disposal method and delay default to unused
transparent = -1; int transparent = -1;
disposal = wxANIM_UNSPECIFIED; disposal = wxANIM_UNSPECIFIED;
delay = -1; delay = -1;
@@ -705,8 +705,7 @@ wxGIFErrorCode wxGIFDecoder::LoadGIF(wxInputStream& stream)
delay = 10 * (buf[2] + 256 * buf[3]); delay = 10 * (buf[2] + 256 * buf[3]);
// read transparent colour index, if used // read transparent colour index, if used
if (buf[1] & 0x01) transparent = buf[1] & 0x01 ? buf[4] : -1;
transparent = buf[4];
// read disposal method // read disposal method
disposal = (wxAnimationDisposal)(((buf[1] & 0x1C) >> 2) - 1); disposal = (wxAnimationDisposal)(((buf[1] & 0x1C) >> 2) - 1);