Bug 158788 - Gwenview does not support image files in RAW format
Summary: Gwenview does not support image files in RAW format
Status: RESOLVED FIXED
Alias: None
Product: gwenview
Classification: Applications
Component: general (show other bugs)
Version: 1.4.1
Platform: Ubuntu Linux
: NOR wishlist
Target Milestone: ---
Assignee: Gwenview Bugs
URL:
Keywords:
: 127022 266916 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-03-05 09:46 UTC by Thomas Damgaard
Modified: 2019-05-21 08:57 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.13.0


Attachments
proposed patch (just basic stuff, further work needed) (11.67 KB, patch)
2013-10-21 08:30 UTC, Martin Kyral
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Damgaard 2008-03-05 09:46:25 UTC
Version:           1.4.1 (using KDE 3.5.8)
Installed from:    Ubuntu Packages

Gwenview does not support RAW image files.

DSLR cameras are becoming more and more common. Thus it is becoming more and more common to take pictures in RAW format (preserving the most information from the images).

I think that Gwenview should support handling RAW image files.
Comment 1 Aurelien Gateau 2008-03-29 00:40:25 UTC
I see your point, but I believe this is outside of Gwenview scope for now. Gwenview main audience is not professional photographers. If you need RAW file support, you probably should use an application like Digikam.
Comment 2 Sven Brauch 2008-04-16 10:43:41 UTC
Hm, not only professional photographers take raw files as default - more and more cameras support this and it´s kind of getting more common. in fact, I know more people with raw file photos than with other ones.

I´d also really like this feature. see you :)
Comment 3 Thomas Damgaard 2011-11-23 20:41:57 UTC
Sven, thank you for confirming the need for this feature. 
It makes me sad when developers have an attitude like "oh, users who need this should not use my application". 
I really hope you will reopen this bug.
Comment 4 Aurelien Gateau 2013-08-05 08:50:15 UTC
*** Bug 266916 has been marked as a duplicate of this bug. ***
Comment 5 Martin Kyral 2013-10-03 19:56:36 UTC
Please reopen the bug. KDE KIPI plugins contain the libkdcraw library, which already supports extracting the embedded jpeg preview from the RAW image (if the RAW file contains it - the common RAW formats do).
See http://api.kde.org/4.x-api/kdegraphics-apidocs/libs/libkdcraw/libkdcraw/html/classKDcrawIface_1_1KDcraw.html#ade5b61f2b3331dddf18857b98d5862d4
Having this knowledge, I suppose it would be very easy to fix this bug for anyone who already knows the sources - and quite easy even for those (C++ aware) hackers who haven't seem them yet.
Comment 6 Martin Kyral 2013-10-21 08:30:43 UTC
Created attachment 82984 [details]
proposed patch (just basic stuff, further work needed)

Attaching patch against the git head to enable support for Canon CR2, Nikon NEF & NRW, Pentax PEF, Sony ARW and DNG RAW formats in gwenview (more formats can be easily added by whitelisting their MIME type). It loads the embedded preview image using KDcraw so it is fast.
The code is incomplete, but usable.
Comment 7 Martin Kyral 2013-10-23 08:21:36 UTC
review started on reviewboard:
https://git.reviewboard.kde.org/r/113397/
Comment 8 Aurelien Gateau 2013-11-19 09:22:47 UTC
Git commit 97d250f3d2c40766e154fac15bf25a8ecdbad879 by Aurélien Gâteau.
Committed on 19/11/2013 at 09:21.
Pushed by gateau into branch 'master'.

RAW preview in gwenview

It uses KDcraw to extract the embedded jpeg preview (most of the raw formats
contain it for the purposes of quick viewing the photos on the camera display)
or loads half-scaled preview (otherwise) so it is fast, implementing was quite
easy and theoretically it enables gwenview to support everything dcraw supports
(I haven't found a raw file that gwenview doesn't show with this patch). The
patch does not perform full demosaicing nor any tweaks (set white balance or so)
and I don't think it shall - digikam, darktable or rawtherapee are much more
suited for developing the 'digital negatives'.

The patch enables support for Nikon NEF and NRW formats, Canon's CR2 and CRW,
Pentax PEF, Sony ARW, Fuji RAF, Olympus ORF, Minolta MRW, Panasonic RW2, Samsung
SRW and Adobe DNG. If you want to try another format, just adding its MIME type
to the list in lib/mimetypeutils.cpp shall be enough.

The patch is feature-complete (generating proper thumbnails and viewing the raw
images incl. EXIF metadata) and well usable.
REVIEW: 113397

M  +4    -0    CMakeLists.txt
M  +1    -0    lib/CMakeLists.txt
M  +66   -23   lib/document/loadingdocumentimpl.cpp
M  +2    -3    lib/gwenviewconfig.kcfg
M  +14   -0    lib/mimetypeutils.cpp
M  +60   -13   lib/thumbnailprovider/thumbnailgenerator.cpp

http://commits.kde.org/gwenview/97d250f3d2c40766e154fac15bf25a8ecdbad879
Comment 9 Christoph Feck 2013-11-19 11:10:25 UTC
Wow, nice :) We didn't even release 4.12, but there are already reasons to desire 4.13 :P
Comment 10 Martin Kyral 2014-01-16 12:50:19 UTC
Please, update the "Version fixed in". It was set to 4.11.3 which is release the fix could not hit even by chance (the patch was ready some 2 weeks after releasing 4.11.3, necessary KDcraw changes were released in 4.12.0). The fix will go to 4.13.0. It's a good feature that deserves appearing in the changelog ;) Thanks.
Comment 11 kdebug 2016-02-22 20:17:21 UTC
Unfortunately gwenview 15.08.3 ( KDE Frameworks 5.18.0, Qt 5.5.1, libkdcraw23 ) does not show my RW2 photos.
Comment 12 Martin Kyral 2016-02-25 08:07:56 UTC
Unfortunatelly, many distributions pushed KF5 version of gwenview before digikam folks ported libkdcraw to KF5 - which happened in the 15.12 release.
Thus, they are shipping gwenview with feature regression. Please, file a bug against your distribution.
Comment 13 Martin Kyral 2019-05-21 08:57:19 UTC
*** Bug 127022 has been marked as a duplicate of this bug. ***