diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2020-10-09 20:52:05 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2020-10-12 15:11:28 +0200 |
commit | 7c90ea5ebc18d36d44870fc829475e471c675a95 (patch) | |
tree | cd847753887ea70623f5485eb8295672f781e341 /vcl/source | |
parent | e1eb5d616b701853532f8c6ba2e89366d596789e (diff) |
try to read JPEGs as BGR if wanted and available
BGR(A) is actually the format used by most VCL backends (Cairo and
Skia at least).
Change-Id: I1574aadabafcea274049d4c7021352913813bae2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104130
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/filter/jpeg/jpegc.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/vcl/source/filter/jpeg/jpegc.cxx b/vcl/source/filter/jpeg/jpegc.cxx index c1fbb535a8e4..0270cc448e82 100644 --- a/vcl/source/filter/jpeg/jpegc.cxx +++ b/vcl/source/filter/jpeg/jpegc.cxx @@ -231,6 +231,12 @@ static void ReadJPEG(JpegStuff& rContext, JPEGReader* pJPEGReader, void* pInputS nPixelSize = 1; } #if defined(JCS_EXTENSIONS) + else if (eFinalFormat == ScanlineFormat::N24BitTcBgr) + { + best_out_color_space = JCS_EXT_BGR; + eScanlineFormat = eFinalFormat; + nPixelSize = 3; + } else if (eFinalFormat == ScanlineFormat::N32BitTcBgra) { best_out_color_space = JCS_EXT_BGRA; |