[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    extragear/graphics/digikam
From:       Gilles Caulier <caulier.gilles () kdemail ! net>
Date:       2007-02-14 20:22:24
Message-ID: 1171484544.826182.6289.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 633686 by cgilles:

digikam from trunk: Native SlideShow : perform optimization if photograph \
informations are not require to be displayed by user during slide. In this case, no \
need to use DMetadata to extract these info from images...

Marcel: it will be time to update database content to perform optimizations \
everywhere. I think than all photograph informations available on right sidebar need \
to be stored at least in database (in a first time, more info later of course) and \
handle by ImageInfo class.

CCMAIL: marcel.wiesweg@gmx.de

 M  +17 -12    digikam/digikamview.cpp  
 M  +9 -3      utilities/imageeditor/editor/imagewindow.cpp  


--- trunk/extragear/graphics/digikam/digikam/digikamview.cpp #633685:633686
@@ -1132,16 +1132,29 @@
 
     DMetadata         meta;
     SlideShowSettings settings;
-    settings.exifRotate = AlbumSettings::instance()->getExifRotate();
+    settings.exifRotate           = AlbumSettings::instance()->getExifRotate();
+    settings.delay                = config->readNumEntry("SlideShowDelay", 5) * \
1000; +    settings.printName            = \
config->readBoolEntry("SlideShowPrintName", true); +    settings.printDate            \
= config->readBoolEntry("SlideShowPrintDate", false); +    \
settings.printApertureFocal   = config->readBoolEntry("SlideShowPrintApertureFocal", \
false); +    settings.printExpoSensitivity = \
config->readBoolEntry("SlideShowPrintExpoSensitivity", false); +    \
settings.printComment         = config->readBoolEntry("SlideShowPrintComment", \
false); +    settings.loop                 = config->readBoolEntry("SlideShowLoop", \
false);  
     for (ImageInfoList::iterator it = infoList.begin(); it != infoList.end(); ++it)
     {
         ImageInfo *info = *it;
         settings.fileList.append(info->kurl());
         SlidePictureInfo pictInfo;
-        meta.load(info->kurl().path());
-        pictInfo.comment            = info->caption();
-        pictInfo.photoInfo          = meta.getPhotographInformations();
+        pictInfo.comment = info->caption();
+
+        // Perform optimizations: only read pictures metadata if necessary.
+        if (settings.printApertureFocal || settings.printExpoSensitivity)
+        {
+            meta.load(info->kurl().path());
+            pictInfo.photoInfo = meta.getPhotographInformations();
+        }
+
         // In case of dateTime extraction from metadata failed 
         pictInfo.photoInfo.dateTime = info->dateTime(); 
         settings.pictInfoMap.insert(info->kurl(), pictInfo);
@@ -1152,14 +1165,6 @@
 
     emit signalProgressBarMode(StatusProgressBar::TextMode, QString::null);   
 
-    settings.delay                = config->readNumEntry("SlideShowDelay", 5) * \
                1000;
-    settings.printName            = config->readBoolEntry("SlideShowPrintName", \
                true);
-    settings.printDate            = config->readBoolEntry("SlideShowPrintDate", \
                false);
-    settings.printApertureFocal   = \
                config->readBoolEntry("SlideShowPrintApertureFocal", false);
-    settings.printExpoSensitivity = \
                config->readBoolEntry("SlideShowPrintExpoSensitivity", false);
-    settings.printComment         = config->readBoolEntry("SlideShowPrintComment", \
                false);
-    settings.loop                 = config->readBoolEntry("SlideShowLoop", false);
-
     SlideShow *slide = new SlideShow(settings);
     if (startWithCurrent)
     {
--- trunk/extragear/graphics/digikam/utilities/imageeditor/editor/imagewindow.cpp \
#633685:633686 @@ -1013,9 +1013,15 @@
         for (ImageInfo *info = d->imageInfoList.first(); info; info = \
d->imageInfoList.next())  {
             SlidePictureInfo pictInfo;
-            meta.load(info->kurl().path());
-            pictInfo.comment            = info->caption();
-            pictInfo.photoInfo          = meta.getPhotographInformations();
+            pictInfo.comment = info->caption();
+
+            // Perform optimizations: only read pictures metadata if necessary.
+            if (settings.printApertureFocal || settings.printExpoSensitivity)
+            {
+                meta.load(info->kurl().path());
+                pictInfo.photoInfo = meta.getPhotographInformations();
+            }
+
             // In case of dateTime extraction from metadata failed 
             pictInfo.photoInfo.dateTime = info->dateTime(); 
             settings.pictInfoMap.insert(info->kurl(), pictInfo);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic