summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2019-03-25 16:58:25 +0100
committerMiklos Vajna <vmiklos@collabora.com>2019-03-26 17:15:15 +0100
commitf8dbee4d860b95717fa906935a8162c7edcd5973 (patch)
treed2ec583b76bfb78d0b07e89e9b5d0b2eae7a12e4 /vcl
parent15e9e6d12aa2d49e114ec0cf8326f2264ccf2640 (diff)
8bit image is "native" only if it has grey palette (tdf#116888)
The image in the bugreport apparently has a different palette even thought it seems to be a grayscale image. Change-Id: I3b442b7e2529a60493b64761eb1c537ee9f05a10 Reviewed-on: https://gerrit.libreoffice.org/69699 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/filter/jpeg/JpegWriter.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/filter/jpeg/JpegWriter.cxx b/vcl/source/filter/jpeg/JpegWriter.cxx
index 407e2423b64a..3164918cc90e 100644
--- a/vcl/source/filter/jpeg/JpegWriter.cxx
+++ b/vcl/source/filter/jpeg/JpegWriter.cxx
@@ -231,7 +231,7 @@ bool JPEGWriter::Write( const Graphic& rGraphic )
*mpExpWasGrey = mbGreys;
if ( mbGreys )
- mbNative = ( mpReadAccess->GetScanlineFormat() == ScanlineFormat::N8BitPal );
+ mbNative = ( mpReadAccess->GetScanlineFormat() == ScanlineFormat::N8BitPal && aGraphicBmp.HasGreyPalette());
else
mbNative = ( mpReadAccess->GetScanlineFormat() == ScanlineFormat::N24BitTcRgb );