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

New commits:
commit e8f7138292b1e5eabac7969e8d6fe64d3dda3e51
Author:     Julien Nabet <[email protected]>
AuthorDate: Sun Apr 17 20:03:26 2022 +0200
Commit:     Xisco Fauli <[email protected]>
CommitDate: Mon Apr 18 15:04:02 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
    (cherry picked from commit 49ee1c889665c3539fa9a1c99a865a42fc08ee97)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133051
    Reviewed-by: Mike Kaganski <[email protected]>
    Tested-by: Jenkins
    (cherry picked from commit 1af0bf010b839b7b34e856dfc5a7385db45c9aa7)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133053
    Reviewed-by: Xisco Fauli <[email protected]>

diff --git a/vcl/source/filter/itiff/itiff.cxx 
b/vcl/source/filter/itiff/itiff.cxx
index 906826ae9e55..03326a36132e 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