[Kde-imaging] Problems with "HTML Export" plugin

Colin McMillen mcmillen at cs.cmu.edu
Sat Apr 28 01:16:22 CEST 2007


> Looks good, only thing I would change is to do the rotation after scaling. This
> should be a bit more efficient (less pixel to move).

Ah, indeed.  Here's a new patch:

--- kipi-plugins/htmlexport/generator.cpp       (revision 658371)
+++ kipi-plugins/htmlexport/generator.cpp       (working copy)
@@ -233,6 +233,11 @@
                if (!mInfo->useOriginalImage() && mInfo->fullResize()) {
                        int size = mInfo->fullSize();
                        image = image.smoothScale(size, size, QImage::ScaleMin);
+                       if (info.angle() != 0) {
+                               QWMatrix matrix;
+                               matrix.rotate(info.angle());
+                               image = image.xForm(matrix);
+                       }
                }

                QImage thumbnail = generateSquareThumbnail(image,
mInfo->thumbnailSize());


More information about the Kde-imaging mailing list