[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdenox/konq-embed/kdesrc/khtml/patches
From: Eva Brucherseifer <eva () kde ! org>
Date: 2006-03-15 18:21:39
Message-ID: 1142446899.247430.14335.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 518934 by eva:
use QImage::smoothScale for image scaling instead of QPixmap.xForm
This is probably slower, but it gives nicer results and preservers the
alpha channel and works for jpgs
M +19 -0 image_scaling.patch
--- trunk/kdenox/konq-embed/kdesrc/khtml/patches/image_scaling.patch #518933:518934
@@ -231,3 +231,22 @@
_style->setDisplay(BLOCK);
_style->setVisuallyOrdered( visuallyOrdered );
// ### make the font stuff _really_ work!!!!
+--- render_image.cpp 2006-03-15 19:17:49.000000000 +0100
++++ render_image.cpp.org 2006-03-15 19:17:27.000000000 +0100
+@@ -305,10 +305,12 @@
+ // kdDebug( 6040 ) << "have to scale: " << endl;
+ // qDebug("cw=%d ch=%d pw=%d ph=%d rcw=%d, rch=%d",
+ // cWidth, cHeight, intrinsicWidth(), intrinsicHeight(), \
resizeCache.width(), resizeCache.height()); +- QWMatrix matrix;
+- matrix.scale( (float)(cWidth)/intrinsicWidth(),
+- (float)(cHeight)/intrinsicHeight() );
+- resizeCache = pix.xForm( matrix );
++// QWMatrix matrix;
++// matrix.scale( (float)(cWidth)/intrinsicWidth(),
++// (float)(cHeight)/intrinsicHeight() );
++// resizeCache = pix.xForm( matrix );
++ QImage qi = pix.convertToImage();
++ resizeCache = qi.smoothScale(cWidth,cHeight);
+ scaledrect.setWidth( ( cWidth*scaledrect.width() ) / \
intrinsicWidth() ); + scaledrect.setHeight( ( \
cHeight*scaledrect.height() ) / intrinsicHeight() ); + // \
qDebug("resizeCache size: %d/%d", resizeCache.width(), resizeCache.height());
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic