Bug 408005 - gwenview does not open (all) GeoTIFFs
Summary: gwenview does not open (all) GeoTIFFs
Status: RESOLVED FIXED
Alias: None
Product: gwenview
Classification: Applications
Component: general (show other bugs)
Version: 18.04.0
Platform: Debian unstable Linux
: NOR normal
Target Milestone: ---
Assignee: Gwenview Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-27 17:54 UTC by Marcos Dione
Modified: 2021-07-01 12:01 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Even GIMP has trouble with it (289.14 KB, image/png)
2019-06-14 04:48 UTC, Nate Graham
Details
gwenview error (33.04 KB, image/png)
2019-06-14 19:24 UTC, Marcos Dione
Details
qgis full (175.16 KB, image/png)
2019-06-14 19:25 UTC, Marcos Dione
Details
qgis 1:1 (131.06 KB, image/png)
2019-06-14 19:25 UTC, Marcos Dione
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marcos Dione 2019-05-27 17:54:59 UTC
SUMMARY
When openeng certain (most, but not all) GeoTIFF files, gwenview presents this 
message:

Loading ‘000x004-hillshade.tif’ failed
Loading meta information failed.

On the console I see this:

QImageReader::read() using format hint "tif" failed: "Unknown error"
QImageReader::read() without format hint failed: "Unsupported image format"
QImageReader::read() using format hint "tif" failed: "Unknown error"
QImageReader::read() without format hint failed: "Unsupported image format"
QImageReader::read() using format hint "tif" failed: "Unknown error"
QImageReader::read() without format hint failed: "Unsupported image format"

I used ldd and strace to guess that libtiff is being used, but libtiff does definitely support GeoTIFF, as it is used by gdal, whi can read and write such files (and gdal's author, Even Rouault, also commits to libtiff (yes, it's all circunstancial, but I think it makes sense).

I would provide a example file, but it weights 9MiB+, and I'm not sure I should attach it or not. Let me know if it's OK.

Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 5.54.0
Qt Version: 5.11.3
Comment 1 Nate Graham 2019-05-28 15:03:57 UTC
9 MB is above the attachment size limit anyway, but feel free to post a link to a location where it can be found.
Comment 2 Marcos Dione 2019-05-28 19:51:33 UTC
Try here:

http://dionecanali.hd.free.fr/~mdione/000x004-hillshade.tif
Comment 3 Nate Graham 2019-06-14 04:48:48 UTC
Created attachment 120856 [details]
Even GIMP has trouble with it

Thanks very much! I notice that even GIMP has trouble with that image. It opens the file, but displays the content as a big blank gray rectangle (see attachment).

It seems like there may be something malformed with these files in question. I would reccommand filing a bug with the authors of the software used to create it. Thanks!
Comment 4 Nate Graham 2019-06-14 04:49:44 UTC
...Unless, it's supposed to be a big gray rectangle. Can you share a screenshot of what it's supposed to look like.
Comment 5 Marcos Dione 2019-06-14 19:22:55 UTC
(In reply to Nate Graham from comment #4)
> ...Unless, it's supposed to be a big gray rectangle. Can you share a
> screenshot of what it's supposed to look like.

The file is fine, it's a proper GeoTIFF (altho a very boring one, I should have used a better example).

I added three attachments:

* gwenview failing to open the file.
* qgis with the whole file shown (yes, a grey square).
* qgis showing the file at 1:1 scale.
Comment 6 Marcos Dione 2019-06-14 19:24:19 UTC
Created attachment 120872 [details]
gwenview error
Comment 7 Marcos Dione 2019-06-14 19:25:05 UTC
Created attachment 120873 [details]
qgis full
Comment 8 Marcos Dione 2019-06-14 19:25:23 UTC
Created attachment 120874 [details]
qgis 1:1
Comment 9 Nate Graham 2019-06-14 20:38:35 UTC
Thanks!
Comment 10 Marcos Dione 2020-11-09 14:28:32 UTC
I just installed phototonic, which seems to also be qt based, it it can't read those files the same way. Maybe we should push this below the tiff handling stack? Also, bump!
Comment 11 Marcos Dione 2021-07-01 06:52:53 UTC
I just tried on a big folder full of GeoTiffs and it worked... except that it was OOM'ed because it ate the whole memory :) But that's something for another ticket. 

In my opinion you can close this one.
Comment 12 Nate Graham 2021-07-01 12:01:18 UTC
Cool, thanks!