|
SVN commit 494227 by cgilles:
digiKam from trunk : USM camera interface can get thumbnails from TIFF, PNG and others image file format using DImg. This is not optimum, especially with TIFF file witch can provide an embedded thumb. A future DImg::getEmbeddedThumbnail() method will be create in this way. CCMAIL: [hidden email] M +5 -4 Makefile.am M +16 -4 umscamera.cpp --- trunk/extragear/graphics/digikam/utilities/cameragui/Makefile.am #494226:494227 @@ -13,10 +13,11 @@ libcameragui_la_LIBADD = $(LIB_GPHOTO) $(LIBKEXIF_LIBS) $(LIBJPEG) INCLUDES= -I$(top_srcdir)/digikam/digikam \ - -I$(top_srcdir)/digikam/utilities/imageeditor/editor \ - -I$(top_srcdir)/digikam/libs/jpegutils \ - -I$(top_srcdir)/digikam/libs/dcraw \ - $(GPHOTO_CFLAGS) $(LIBKEXIF_CFLAGS) $(all_includes) + -I$(top_srcdir)/digikam/utilities/imageeditor/editor \ + -I$(top_srcdir)/digikam/libs/jpegutils \ + -I$(top_srcdir)/digikam/libs/dimg \ + -I$(top_srcdir)/digikam/libs/dcraw \ + $(GPHOTO_CFLAGS) $(LIBKEXIF_CFLAGS) $(all_includes) digikamcameraguiicondir = $(kde_datadir)/digikam/icons digikamcameraguiicon_ICON = AUTO --- trunk/extragear/graphics/digikam/utilities/cameragui/umscamera.cpp #494226:494227 @@ -49,6 +49,7 @@ // Local includes. +#include "dimg.h" #include "dcraw_parse.h" #include "albumsettings.h" #include "umscamera.h" @@ -154,9 +155,11 @@ if (!thumbnail.isNull()) return true; } - - // Trying to get thumbnail from RAW file using dcraw parse utility. + // TODO: check for thm files if we didn't manage to get thumbnail from exif + + // Trying to get thumbnail from RAW file using dcraw parse utility. + KTempFile thumbFile(QString::null, "camerarawthumb"); thumbFile.setAutoDelete(true); Digikam::DcrawParse rawFileParser; @@ -172,8 +175,17 @@ } } - // TODO: check for thm files if we didn't manage to get thumbnail from exif - + // Trying to get thumbnail using DImg. + // TODO : in the future, we need to use future DImg::getEmbeddedThumnail method instead ! + + Digikam::DImg dimg_im(QFile::encodeName(folder + "/" + itemName)); + + if (!dimg_im.isNull()) + { + thumbnail = dimg_im.copyQImage(); + return true; + } + return false; } _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
| Free forum by Nabble | Edit this page |
