[Libreoffice-commits] core.git: vcl/source
Luboš Luňák (via logerrit)
logerrit at kemper.freedesktop.org
Tue Mar 26 16:15:40 UTC 2019
vcl/source/filter/jpeg/JpegWriter.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit f8dbee4d860b95717fa906935a8162c7edcd5973
Author: Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Mon Mar 25 16:58:25 2019 +0100
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Tue Mar 26 17:15:15 2019 +0100
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 at collabora.com>
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 );
More information about the Libreoffice-commits
mailing list