Bug 74331 - 16bit "Photometric Interpretation: min-is-black" tiff not loaded correctly
Summary: 16bit "Photometric Interpretation: min-is-black" tiff not loaded correctly
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
4.2.0.4 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.4.0
Keywords:
Depends on:
Blocks: Images-TIFF
  Show dependency treegraph
 
Reported: 2014-02-01 17:16 UTC by Daniil Bratashov
Modified: 2022-05-02 11:37 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
small example to test (70.50 KB, application/vnd.ms-powerpoint)
2014-02-01 17:16 UTC, Daniil Bratashov
Details
tiff image used (78.27 KB, image/tiff)
2014-02-01 21:05 UTC, Daniil Bratashov
Details
ms powerpoint and LO both show black square (150.21 KB, image/jpeg)
2015-04-26 09:05 UTC, steve
Details
re-added tiff, all is good (106.15 KB, image/jpeg)
2015-04-26 09:05 UTC, steve
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniil Bratashov 2014-02-01 17:16:21 UTC
Created attachment 93179 [details]
small example to test

When the document contain 16bit tiff image, it is either not loaded at all, or shown distorted, or shown as single color rectangle.
Comment 1 Jean-Baptiste Faure 2014-02-01 20:49:02 UTC
Please, could you attach a screencopy showing how this test file looks in MS-Powerpoint? 

Tested with LO 4.1.4, LO 4.2.1.0.0+ and the master on Ubuntu 13.10 x86-64; each shows a black rectangle.
I guess it is not what is expected. So set status to NEW.

Best regards. JBF
Comment 2 Daniil Bratashov 2014-02-01 21:05:07 UTC
Created attachment 93197 [details]
tiff image used

Sorry, not have powerpoint available just now, image should look like this (some sort of grid)
Comment 3 steve 2015-04-26 09:05:06 UTC
I don't think this is a bug. The attached test file shows identical in MS Powerpoint and LO (screenshot attached).

In both cases a back square is shown in the middle of the document. So this is not a LO bug, but it seems something with the file is broken.

Then downloaded .tiff file and added that in MS Powerpoint. Save file. Open saved file with LO → all is good.

WORKSFORME (attaching screenshots)
Comment 4 steve 2015-04-26 09:05:31 UTC
Created attachment 115110 [details]
ms powerpoint and LO both show black square
Comment 5 steve 2015-04-26 09:05:49 UTC
Created attachment 115111 [details]
re-added tiff, all is good
Comment 6 Daniil Bratashov 2015-04-26 12:39:06 UTC
It is working right only in recent versions of powerpoint (2013 should work, 2007 should not, I've no 2010 version).
Comment 7 V Stuart Foote 2015-08-06 04:05:06 UTC
Confirming this is still an issue filter parsing with LibreOffice, either opening into Draw or on insert into Draw the TIFF raster is rendered as a solid black image.

On Windows 7 sp1, 64-bit en-US with

Version: 5.0.0.5 (x64)
Build ID: 1b1a90865e348b492231e1c451437d7a15bb262b
Locale: en-US (en_US)
Comment 8 QA Administrators 2016-09-20 10:20:57 UTC Comment hidden (obsolete)
Comment 9 Daniil Bratashov 2016-09-21 20:05:37 UTC
Bug still exist in LO 5.2.1.2 (slackware linux, official x86 binary build from slackbuilds.org).
Comment 10 Xisco Faulí 2017-09-29 08:51:41 UTC Comment hidden (obsolete)
Comment 11 V Stuart Foote 2019-06-29 01:26:11 UTC
Attachment 93197 [details] when opened or inserted to LO still shows as a single black rectangle.

On Windows 10 Home 64-bit en-US (1809)
Version: 6.2.4.2 (x64)
Build ID: 2412653d852ce75f65fbfa83fb7e7b669a126d64
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
Locale: en-US (en_US); UI-Language: en-US
Calc: threaded
Comment 12 Timur 2021-05-05 10:29:52 UTC
This bug is just: load TIFF attachment 93197 [details] in LO (Writer, Impress).
Bug is black rectangle. 
Repro 7.2+ Win and Lin.
Looks duplicate to bug 36300.

*** This bug has been marked as a duplicate of bug 36300 ***
Comment 13 Julien Nabet 2022-04-21 10:05:09 UTC
16 bits indeed but "Photometric Interpretation: min-is-black" retrieved by tiffinfo.
Comment 14 Julien Nabet 2022-04-21 10:06:05 UTC
Here's a patch waiting for review:
https://gerrit.libreoffice.org/c/core/+/133251
Comment 15 Julien Nabet 2022-04-21 19:21:56 UTC
I abandoned my patch since there was a regression on tdf#115863 (black and white are reversed)
Comment 16 Commit Notification 2022-04-28 10:41:09 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/bd1d0967920655ef85a2352259332f99fef6876e

tdf#74331: 16bit "min-is-black" tiff not loaded correctly

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.
Comment 17 Julien Nabet 2022-04-28 10:45:41 UTC
I finally found another way which doesn't bring some regression.
Comment 18 Commit Notification 2022-04-28 19:21:19 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/49ce19a824700b2011334a6739ae2749e781155f

tdf#74331: 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.
Comment 19 Julien Nabet 2022-04-29 17:11:15 UTC
There's a pb with the patch, it's already been reverted but hopefully Caolán proposed a better one here:
https://gerrit.libreoffice.org/c/core/+/133638
Comment 20 Commit Notification 2022-04-30 09:50:21 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/1f81dd9b05c4eaa3e4caae8fe38ef2ee7eb1db49

ofz#47104 Revert "tdf#74331: 16bit "min-is-black" tiff not loaded correctly"

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.
Comment 21 Commit Notification 2022-05-01 09:04:10 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/520d8c9ec7718cf6678614ecf18656dafcad9445

tdf#74331: 16bit "min-is-black" tiff not loaded correctly

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.
Comment 22 Xisco Faulí 2022-05-02 09:49:51 UTC
I guess we can call this fixed again