Description: When loading a tif image into a document I get the response: Unknown format. Other formats works well Steps to Reproduce: 1.Insert a tif-image 2. 3. Actual Results: Unknown format Expected Results: Loaded ok Reproducible: Always User Profile Reset: No OpenGL enabled: Yes Additional Info:
Thank you for reporting the bug. I can't reproduce it in Version: 6.1.4.1 (x64) Build ID: 25073d18caee244880112e52c4a7e71f6081b3a9 CPU threads: 4; OS: Windows 10.0; UI render: default; Locale: de-DE (de_DE); Calc: group threaded Thank you for reporting the bug. Please attach a sample tif file, as this makes it easier for us to verify the bug. (Please note that the attachment will be public, remove any sensitive information before attaching it. See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help on how to do so.) I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested info is provided.
Created attachment 147509 [details] 2 samples of tif-files that trigger "Unknown format"
reproducible with attached tif. also noticed: drag & drop into writer document opens "Insert Section" dialog
Also reproduced in Version: 5.2.0.0.alpha0+ Build ID: 3ca42d8d51174010d5e8a32b96e9b4c0b3730a53 Threads 4; Ver: 4.15; Render: default; LibreOffice 3.3.0 OOO330m19 (Build:6) tag libreoffice-3.3.0.4
Repro 7.2+. Message is "Image filter not found".
tiffinfo gives: === TIFF directory 0 === TIFF Directory at offset 0x86814 (550932) Subfile Type: (0 = 0x0) Image Width: 7581 Image Length: 3457 Resolution: 200, 200 Bits/Sample: 8 Compression Scheme: Deflate Photometric Interpretation: palette color (RGB from colormap) Orientation: row 0 top, col 0 lhs Samples/Pixel: 1 Rows/Strip: 1 Planar Configuration: single image plane Color Map: (present) Today, tiff mechanism import in LO doesn't implement "Deflate" compression. IHMO, it should be considered as an enhancement.
I noticed there's include/package/Inflater.hxx (to decompress "Deflate" compressed code) but this one takes "Sequence" var for in and out. So if someone wants to use it, at least it won't be from scratch.
(In reply to Julien Nabet from comment #7) > I noticed there's include/package/Inflater.hxx (to decompress "Deflate" > compressed code) but this one takes "Sequence" var for in and out. > So if someone wants to use it, at least it won't be from scratch. Of course this person may also prefer implementing libtiff or another lib for this to read several tiff "flavors" in a row but it'll be more work as already indicated in another bugtracker related to tiff. Could be an idea for Gsoc next year?
I gave a try with https://gerrit.libreoffice.org/c/core/+/134485
(In reply to Julien Nabet from comment #8) > Could be an idea for Gsoc next year? Buovjaga is a person for ideas. But since you are in it now, do you consider yourself a candidate for that, GSoC or not? Yes, an endeavor, but that would be an achievement.
(In reply to Timur from comment #10) > (In reply to Julien Nabet from comment #8) > > Could be an idea for Gsoc next year? > > Buovjaga is a person for ideas. > But since you are in it now, do you consider yourself a candidate for that, > GSoC or not? No thank you. > Yes, an endeavor, but that would be an achievement. Indeed! I suppose it also depends on if tiff format is widely and often used or not and I have no idea about this.
(In reply to Julien Nabet from comment #11) > (In reply to Timur from comment #10) > > (In reply to Julien Nabet from comment #8) > > > Could be an idea for Gsoc next year? > > > > Buovjaga is a person for ideas. > > But since you are in it now, do you consider yourself a candidate for that, > > GSoC or not? > No thank you. > > > Yes, an endeavor, but that would be an achievement. > Indeed! I suppose it also depends on if tiff format is widely and often used > or not and I have no idea about this. Gutting out our own OOo/LO code and doing the libtiff integration, assuming permisible licensing, seems the better GSOC project scope. Might need to be stripped down a bit cross platform, but would go into /external like poppler, pdfium, libpng, etc.
Julien Nabet committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/f0d3727322207b3a547313e14305440ad7009079 tdf#122057: read tiff with deflate compression (code 32946 only) 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.
I'd like to have 1 or 2 more examples with this specific compression 32946 because a black rectangle isn't a good example. (hope the attachment was indeed a black rectangle, at least Gimp displays as this). I tried to generate an example file with Gimp but it exports with Adobe deflate 8 code. Remark: I pushed the patch quickly on master so people can give it a try. If it's wrong, it can be reverted.
Julien Nabet committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/522de4493e982d987f55fd88a64dd9e83c46e895 Revert "tdf#122057: read tiff with deflate compression (code 32946 only)" 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.
Argh, just opened with Firebird, it's not a black rectangle but design plan for a house. The patch was wrong then so I reverted it :-(.
I've committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/22b50f1937de67e4ad9e692d6964aa5b8d33af7a use libtiff for tiff import 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.
I confirm it works!