After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 431483 - dcraw-based raw file thumbnail generation is terribly slow
dcraw-based raw file thumbnail generation is terribly slow
Status: RESOLVED FIXED
Product: gthumb
Classification: Other
Component: general
2.10.x
Other Linux
: Normal normal
: ---
Assigned To: Paolo Bacchilega
Paolo Bacchilega
Depends on:
Blocks:
 
 
Reported: 2007-04-19 21:03 UTC by Anton Keks
Modified: 2007-04-29 21:32 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Anton Keks 2007-04-19 21:03:25 UTC
If libopenraw is not available, then gthumb uses dcraw for thumbnail generation.

This is terribly slow (one thumbnail per 4-5 seconds or so in my case)

However, dcraw -e is able to extract the embedded JPEG thumbnail that is already in the raw file. These embedded thumbnails usually have quite an ok resolution (1500x1024 in CR2 from Digital Rebel XP) and can be used for much faster thumbnail generation.

To me, it seems that this is a viable alternative and probably requires very few changes in the code.
Comment 1 Michael Chudobiak 2007-04-20 12:24:40 UTC
I'm not sure that I trust the embedded thumbnail in all circumstances, especially if other programs have manipulated the image.

However, I've sped up raw thumbnail generation using the dcraw -h option in the development version of gthumb (svn rev 1599 and later). This speeds things up noticeably.

Let me know how it works for you now.

- Mike
Comment 2 Anton Keks 2007-04-21 19:21:06 UTC
It is faster now, indeed, however not fast enough to be usable...

Why don't you trust embedded thumbnails in raw files? Isn't it what libopenraw returns anyway? 

Moreover, I don't think that there are any programs out there modifying RAW photos. All RAW converters or editors I have tried save your modifications separately from the RAW file itself and then use these settings for exporting RAW files to other formats. So, we can be pretty sure that the embedded thumbnail has the same content as the image itself.

The only problem with embedded thumbnails I have discovered is that they are slightly darker than images produced by "dcraw -w" (images are from Canon 350D), however the white balance is the same. To me, this is a minor problem compared to thumbnail generation speed improvements they can provide.
Comment 3 Michael Chudobiak 2007-04-21 21:10:37 UTC
OK, try the most recent svn (rev 1607 or higher).

I now use "dcraw -e" first, and fall back to "dcraw -h" if it fails.

I was a little wary about embedded thumbnails, because I've seen many programs screw up the thumbnails embedded in normal jpegs! However, we'll give this a try...

- Mike
Comment 4 Michael Chudobiak 2007-04-21 21:48:27 UTC
Beware, this change has caused an odd side-effect: bug 432084.

- Mike
Comment 5 Anton Keks 2007-04-29 20:59:02 UTC
It seems that it is a lot better now!
Not as fast as libopenraw, but very close.

Thanks. I guess the bug can be closed now.
Comment 6 Michael Chudobiak 2007-04-29 21:32:17 UTC
This should appear in the 2.10.3 release.

- Mike