Ticket #917: fastthumbs.2.patch
File fastthumbs.2.patch, 1.3 KB (added by , 18 years ago) |
---|
-
mythgallery/mythgallery/thumbgenerator.cpp
28 28 #include "mythtv/mythcontext.h" 29 29 #include "mythtv/util.h" 30 30 31 #include "config.h" 31 32 #include "thumbgenerator.h" 32 33 #include "constants.h" 33 34 #include "galleryutil.h" 34 35 36 #ifdef EXIF_SUPPORT 37 #include <libexif/exif-data.h> 38 #include <libexif/exif-entry.h> 39 #endif // EXIF_SUPPORT 40 41 35 42 ThumbGenerator::ThumbGenerator(QObject *parent, int w, int h) 36 43 { 37 44 m_parent = parent; … … 211 218 } 212 219 213 220 if (found) { 214 image.load(f->absFilePath());221 loadFile(image,*f); 215 222 return; 216 223 } 217 224 else { … … 279 286 } 280 287 else 281 288 { 289 290 #ifdef EXIF_SUPPORT 291 //Try to get thumbnail from exif data 292 //lib exif is simple but not very intuitive when it comes to thumbnails!. 293 ExifData *ed = exif_data_new_from_file (fi.absFilePath()); 294 if (ed && ed->data) 295 { 296 image.loadFromData(ed->data,ed->size); 297 } 298 else 299 { 300 #endif // EXIF_SUPPORT 301 282 302 image.load(fi.absFilePath()); 303 304 #ifdef EXIF_SUPPORT 305 } 306 #endif // EXIF_SUPPORT 283 307 } 284 308 } 285 309