diff options
author | Patrick Luby <plubius@neooffice.org> | 2023-11-03 10:37:00 -0400 |
---|---|---|
committer | Patrick Luby <plubius@neooffice.org> | 2023-11-03 18:32:26 +0100 |
commit | 2a5dac6d75b346a77652dec05cafa6562177d40f (patch) | |
tree | 0d6f525df92a046d42664d5e951c4d483c82b5b1 /vcl | |
parent | af9b546cf5eef3df417e225c8ad87283ab51e1bb (diff) |
tdf#158047 allow the tdf#157635 fix for palettes with 64 entries
Change-Id: Ib4e4deb5f7e332a7ef3a9231e993231068c21c4f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158885
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Patrick Luby <plubius@neooffice.org>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/filter/igif/gifread.cxx | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/vcl/source/filter/igif/gifread.cxx b/vcl/source/filter/igif/gifread.cxx index 78d3190a0c85..cac966c665f4 100644 --- a/vcl/source/filter/igif/gifread.cxx +++ b/vcl/source/filter/igif/gifread.cxx @@ -319,8 +319,6 @@ void GIFReader::ReadPaletteEntries( BitmapPalette* pPal, sal_uLong nCount ) rColor.SetBlue( *pTmp++ ); } - bEnhance = false; - // if possible accommodate some standard colours if( nCount < 256 ) { @@ -329,15 +327,13 @@ void GIFReader::ReadPaletteEntries( BitmapPalette* pPal, sal_uLong nCount ) if( nCount < 255 ) (*pPal)[ 254UL ] = COL_BLACK; } - else - { - // tdf#157793 limit tdf#157635 fix to only larger palettes - // I don't know why, but the fix for tdf#157635 causes - // images with a palette of 16 entries to be inverted. - // Is this the only condition for masking out black - // pixels in non-transparent animation frames? - bEnhance = true; - } + + // tdf#157793 limit tdf#157635 fix to only larger palettes + // I don't know why, but the fix for tdf#157635 causes + // images with a palette of 16 entries to be inverted. + // Also, fix tdf#158047 by allowing the tdf#157635 fix for + // palettes with 64 entries. + bEnhance = (nCount > 16); } bool GIFReader::ReadExtension() |