commit 8b2c8dbf91c6e3a769e0fdc8d68ebafe3fe5866e parent 8cc5c06531de1eeb6345c92dbbad1ca6b78c412c Author: Nils Durner <durner@gnunet.org> Date: Sun, 25 Jun 2006 08:51:33 +0000 add comment Diffstat:
| M | src/plugins/thumbnailextractorqt.cc | | | 11 | ++++++++--- |
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/plugins/thumbnailextractorqt.cc b/src/plugins/thumbnailextractorqt.cc @@ -53,7 +53,7 @@ void __attribute__ ((constructor)) thumnailextractorqt_init(void) app = new QApplication(argc, &argv); } -void __attribute__ ((destructor)) my_fini(void) +void __attribute__ ((destructor)) thumnailextractorqt_done(void) { delete app; free(argv); @@ -192,11 +192,16 @@ struct EXTRACTOR_Keywords * libextractor_thumbnailqt_extract(const char * filena height = 1; if (width == 0) width = 1; - - /* Resize image */ + + /* Change color depth */ QImage thumb = img->convertToFormat(colors); delete img; + /* Resize image + * + * Qt's scaled() produces poor quality if the image is resized to less than + * half the size. Therefore, we resize the image in multiple steps. + * http://lists.trolltech.com/qt-interest/2006-04/msg00376.html */ while(true) { width /= 2;