SVN commit 505168 by cgilles:
digikam from stable : CameraGUI : backport method to get thumbnails from .THM files with USM cameras CCMAIL: [hidden email] M +23 -5 umscamera.cpp --- branches/stable/extragear/graphics/digikam/utilities/cameragui/umscamera.cpp #505167:505168 @@ -144,7 +144,7 @@ { m_cancel = false; - // Trying to get thumbnail from Exif data. + // In 1st, we trying to get thumbnail from Exif data if we are JPEG file. KExifData exifData; @@ -154,8 +154,21 @@ if (!thumbnail.isNull()) return true; } + + // In 2th, we trying to get thumbnail from '.thm' files if we didn't manage to get + // thumbnail from Exif. Any cameras provides *.thm files like JPEG files with RAW files. + // Using this way is always more speed than using dcraw parse utility. + // 2006/27/01 - Gilles - Tested with my Minolta Dynax 5D USM camera. + + QFileInfo fi(folder + "/" + itemName); + + if (thumbnail.load(folder + "/" + fi.baseName() + ".thm")) + { + if (!thumbnail.isNull()) + return true; + } - // Trying to get thumbnail from RAW file using dcraw parse utility. + // In 3rd we trying to get thumbnail from RAW files using dcraw parse utility. KTempFile thumbFile(QString::null, "camerarawthumb"); thumbFile.setAutoDelete(true); @@ -164,16 +177,21 @@ if (thumbFile.status() == 0) { if (rawFileParser.getThumbnail(QFile::encodeName(folder + "/" + itemName), - QFile::encodeName(thumbFile.name())) == 0) + QFile::encodeName(thumbFile.name())) == 0) { thumbnail.load(thumbFile.name()); if (!thumbnail.isNull()) return true; } } + + // Finaly, we trying to get thumbnail using KDELib API. This way can take a while. + + thumbnail.load(folder + "/" + itemName); - // TODO: check for thm files if we didn't manage to get thumbnail from exif - + if (!thumbnail.isNull()) + return true; + return false; } _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Op vrijdag 3 februari 2006 12:17, schreef Gilles Caulier:
> SVN commit 505168 by cgilles: > > digikam from stable : CameraGUI : backport method to get thumbnails from > .THM files with USM cameras > My mistake. Thanks Gilles. Toma _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel attachment0 (196 bytes) Download Attachment |
Le Vendredi 3 Février 2006 20:13, Tom Albers a écrit :
> Op vrijdag 3 februari 2006 12:17, schreef Gilles Caulier: > > SVN commit 505168 by cgilles: > > > > digikam from stable : CameraGUI : backport method to get thumbnails from > > .THM files with USM cameras > > My mistake. Thanks Gilles. > De rien, c'est juste 5 minutes de programmation... Gilles _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Free forum by Nabble | Edit this page |