vcl/source/filter/itiff/itiff.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 49ee1c889665c3539fa9a1c99a865a42fc08ee97
Author:     Julien Nabet <serval2...@yahoo.fr>
AuthorDate: Sun Apr 17 20:03:26 2022 +0200
Commit:     Tomaž Vajngerl <qui...@gmail.com>
CommitDate: Mon Apr 18 11:58:51 2022 +0200

    tdf#142151: Red cast rendered in 16 bit TIFF image
    
    I found this fix by testing "pure" red/green/blue files (see attachments in 
the bugtracker)
    where red 16 bits file was ok but not green and blue 16 bits ones.
    
    Change-Id: Ic700a0fa17c3056d1d4f1d1a7f16a799ff4c7378
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133108
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>
    Reviewed-by: Tomaž Vajngerl <qui...@gmail.com>

diff --git a/vcl/source/filter/itiff/itiff.cxx 
b/vcl/source/filter/itiff/itiff.cxx
index 11af8b4482ef..5e54eeaa155a 100644
--- a/vcl/source/filter/itiff/itiff.cxx
+++ b/vcl/source/filter/itiff/itiff.cxx
@@ -912,8 +912,8 @@ bool TIFFReader::ConvertScanline(sal_Int32 nY)
                     if ( nPlanes < 3 )
                     {
                         nRed = GetBits( getMapData(0), ( nx * nSamplesPerPixel 
+ 0 ) * nBitsPerSample, nBitsPerSample );
-                        nGreen = GetBits( getMapData(1), ( nx * 
nSamplesPerPixel + 1 ) * nBitsPerSample, nBitsPerSample );
-                        nBlue = GetBits( getMapData(2), ( nx * 
nSamplesPerPixel + 2 ) * nBitsPerSample, nBitsPerSample );
+                        nGreen = GetBits( getMapData(0), ( nx * 
nSamplesPerPixel + 1 ) * nBitsPerSample, nBitsPerSample );
+                        nBlue = GetBits( getMapData(0), ( nx * 
nSamplesPerPixel + 2 ) * nBitsPerSample, nBitsPerSample );
                     }
                     else
                     {

Reply via email to