Ticket #917: fastthumbs.patch
File fastthumbs.patch, 1.6 KB (added by , 20 years ago) |
---|
-
mythgallery/mythgallery/thumbgenerator.cpp
old new 24 24 #include <qobject.h> 25 25 #include <qfileinfo.h> 26 26 #include <qdir.h> 27 27 #include "config.h" 28 28 #include "mythtv/mythcontext.h" 29 29 30 30 #include "thumbgenerator.h" 31 31 #include "constants.h" 32 32 #include "galleryutil.h" 33 #ifdef EXIF_SUPPORT 34 #include <libexif/exif-data.h> 35 #include <libexif/exif-entry.h> 36 #endif // EXIF_SUPPORT 33 37 34 38 ThumbGenerator::ThumbGenerator(QObject *parent, int w, int h) 35 39 { … … 205 209 } 206 210 207 211 if (found) { 208 image.load(f->absFilePath());212 loadFile(image,*f); 209 213 return; 210 214 } 211 215 else { … … 272 276 } 273 277 else 274 278 { 279 #ifdef EXIF_SUPPORT 280 //Try to get thumbnail from exif data 281 //lib exif is simple but not very intuitive when it comes to thumbnails!. 282 ExifData *ed = exif_data_new_from_file (fi.absFilePath()); 283 if (ed && ed->data) 284 { 285 image.loadFromData(ed->data,ed->size); 286 } 287 else 288 { 289 #endif // EXIF_SUPPORT 290 275 291 image.load(fi.absFilePath()); 292 293 #ifdef EXIF_SUPPORT 294 } 295 #endif // EXIF_SUPPORT 276 296 } 277 297 } -
mythgallery/mythgallery/iconview.cpp
old new 437 437 } 438 438 439 439 440 item->pixmap = new QPixmap(td->thumb); 441 440 442 int pos = m_itemList.find(item); 441 443 442 444 if ((m_topRow*m_nCols <= pos) &&