Created attachment 171740 [details] 16 bit Tiff image of a watch, low resolution as example. 16 bit TIFF image is imported into Writer document but is rendered with a strong red cast. Question raised on https://ask.libreoffice.org/en/question/307974/writer-insert-image-comes-out-red/ Expected case: It is imported and rendered as it would appear normally in a graphics viewer. Compare Word 2010 which renders it normally. Not a common issue as 16 bit is not normally used in general work. Sample image attached that will render with a red cast Version: 7.0.5.2 (x64) Build ID: 64390860c6cd0aca4beafafcfd84613dd9dfb63a CPU threads: 8; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win Locale: en-NZ (en_NZ); UI: en-GB Calc: CL
The mishandling seems to happen in the TIFF filter as the same image saved as 16 bit PNG displays normally, without any red cast.
Repro with: Version: 7.1.3.2 (x64) / LibreOffice Community Build ID: 47f78053abe362b9384784d31a6e56f8511eb1c1 CPU threads: 12; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win Locale: ru-RU (ru_RU); UI: en-US Calc: CL as well as with current master, and also with OOo 3.2.0.
Created attachment 179627 [details] RGB 8 bits I attached a zip containing 3 files with RGB 8 bits without compression (1 red, 1 green, 1 blue) => it's ok
Created attachment 179628 [details] RGB 16 bits first 10 lines returned by tiffinfo 16bitImage100dpi.tif gives: TIFF Directory at offset 0x8 (8) Image Width: 138 Image Length: 338 Resolution: 100, 100 pixels/inch Bits/Sample: 16 Sample Format: unsigned integer Compression Scheme: None Photometric Interpretation: RGB color Orientation: row 0 top, col 0 lhs Samples/Pixel: 3 Rows/Strip: 128 So I attached a zip containing 3 files with RGB 16 bits without compression (1 red, 1 green, 1 blue) => red one is ok, the 2 others are black. The pb seems the 16 bits color case.
I gave a try with https://gerrit.libreoffice.org/c/core/+/133108
Julien Nabet committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/49ee1c889665c3539fa9a1c99a865a42fc08ee97 tdf#142151: Red cast rendered in 16 bit TIFF image It will be available in 7.4.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
*** Bug 36300 has been marked as a duplicate of this bug. ***
Julien Nabet committed a patch related to this issue. It has been pushed to "libreoffice-7-3": https://git.libreoffice.org/core/commit/1af0bf010b839b7b34e856dfc5a7385db45c9aa7 tdf#142151: Red cast rendered in 16 bit TIFF image It will be available in 7.3.4. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Julien Nabet committed a patch related to this issue. It has been pushed to "libreoffice-7-2": https://git.libreoffice.org/core/commit/e8f7138292b1e5eabac7969e8d6fe64d3dda3e51 tdf#142151: Red cast rendered in 16 bit TIFF image It will be available in 7.2.7. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Xisco Fauli committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/4845e68e6575030464c260406b667f0a51bf4a9e tdf#142151: vcl_filters: Add unittest It will be available in 7.4.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Julien Nabet committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/dc97aac5cdfa3789d4e71e9d92df6e7e68802825 Following tdf#142151: Red cast rendered in 16 bit TIFF image It will be available in 7.4.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Julien Nabet committed a patch related to this issue. It has been pushed to "libreoffice-7-3-3": https://git.libreoffice.org/core/commit/46b316ee61657ab44e5dcb56ed66626d97f3c04a tdf#142151: Red cast rendered in 16 bit TIFF image It will be available in 7.3.3. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Let's simplify a bit targets.
Julien Nabet committed a patch related to this issue. It has been pushed to "libreoffice-7-3": https://git.libreoffice.org/core/commit/ab3bfc464f681c715f04b6c3135b850bab8576d3 Following tdf#142151: Red cast rendered in 16 bit TIFF image It will be available in 7.3.4. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.