[Kde-imaging] Problems with "HTML Export" plugin
Colin McMillen
mcmillen at cs.cmu.edu
Fri Apr 27 13:46:53 CEST 2007
On 4/27/07, Stéphane Pontier <shadow.w at gmail.com> wrote:
> On 4/27/07, Colin McMillen <mcmillen at cs.cmu.edu> wrote:
> > The rotation looks to be a bit more involved, but I can probably
> > figure that out if I have a spare weekend :)
>
> For the rotation, you can take a look at the gpssync/kmlexport.cpp
> around line 169 and use this code in htmlexport/generator.cpp around
> line 232 (as I used the html export as exemple to build the
> kmlexport).
> The only problem is that it use info.angle() that is returned by the
> host application and then can give strange result (good rotation in
> digikam but bad one in gwenview).
Thanks to you and Angelo! With your help, I was able to get
kipi-plugins built and create my first patch. :) Here is a patch that
rotates the images properly:
Index: kipi-plugins/htmlexport/generator.cpp
===================================================================
--- kipi-plugins/htmlexport/generator.cpp (revision 658371)
+++ kipi-plugins/htmlexport/generator.cpp (working copy)
@@ -232,6 +232,11 @@
// Process images
if (!mInfo->useOriginalImage() && mInfo->fullResize()) {
int size = mInfo->fullSize();
+ if (info.angle() != 0) {
+ QWMatrix matrix;
+ matrix.rotate(info.angle());
+ image = image.xForm(matrix);
+ }
image = image.smoothScale(size, size, QImage::ScaleMin);
}
--
Colin McMillen - http://www.colinm.org - PGP: E2A793A0
Computer Science Ph.D. Candidate, Carnegie Mellon University
More information about the Kde-imaging
mailing list