Bug 441712

Summary: DNG file preview shown as TV static
Product: [Frameworks and Libraries] kio-extras Reporter: Ilgaz Öcal <ilgaz>
Component: Thumbnails and previewsAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal CC: martin.sandsmark, nate
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Ilgaz Öcal 2021-08-29 17:13:27 UTC
SUMMARY


STEPS TO REPRODUCE
1. browse folder containing this ( https://drive.google.com/file/d/1_m0vZo9LYBNBWgC1hRnE5mjs1QvBoULY/view?usp=sharing )DNG file
2. Also open with gwenview
3. 

OBSERVED RESULT

DNG thumbnail shows as "TV static" gwenview also shows as TV static

EXPECTED RESULT

DNG thumbnail should show the photo thumbnail
SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
Operating System: openSUSE Tumbleweed 20210827
KDE Plasma Version: 5.22.4
KDE Frameworks Version: 5.85.0
Qt Version: 5.15.2
Kernel Version: 5.13.12-2-default (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i5-5200U CPU @ 2.20GHz
Memory: 7.7 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 5500
ADDITIONAL INFORMATION
DNG file has been converted from this https://drive.google.com/file/d/14HlTDyYdoS_jabHm8wEPZYqqmVbOw6MO/view?usp=sharing CR2 (Canon EOS RAW) to DNG via Digikam 7.3.0 (mistakenly reported as digikam bug)
Comment 1 Martin Sandsmark 2021-09-22 15:30:53 UTC
It happens if something tries to parse it as a tiff file (same with kolourpaint).

https://invent.kde.org/graphics/gwenview/-/merge_requests/111 fixes it
Comment 2 Martin Sandsmark 2021-09-22 15:33:06 UTC
Just to explain a bit more: it works fine if you have e. g. qtraw installed and open it in a normal application (like phototonic), but it doesn't work in apps that try to be clever themselves instead of letting QImageReader resolve the filetype.
Comment 3 Martin Sandsmark 2021-09-22 16:34:22 UTC
Ok, let me contradict myself: DNG is the dumbest format I've seen, and that includes a lot of proprietary game data formats from the 90s.

It's basically impossible to detect without trying to load in the entire (very complex) file, and then you might or might not get random data to show. Since everything prefers to just check the first bytes of the file to see what plugin to load, since that makes sense for all other formats, it's going to fail in most applications unless patched.

Everyone from imagemagick to file and file-type.js have given up on it, hopefully it gets deprecated.