summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/slave/jpeg_slave.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/noncore/graphics/opie-eye/slave/jpeg_slave.cpp b/noncore/graphics/opie-eye/slave/jpeg_slave.cpp
index fb7d5de..1bb81d9 100644
--- a/noncore/graphics/opie-eye/slave/jpeg_slave.cpp
+++ b/noncore/graphics/opie-eye/slave/jpeg_slave.cpp
@@ -1417,2 +1417,4 @@ QPixmap JpegSlave::pixmap( const QString& path, int wid, int hei) {
ExifData ImageInfo;
+ /*
+ */
if ( !ImageInfo.scan( path ) || ImageInfo.isNullThumbnail() ) {
@@ -1420,4 +1422,10 @@ QPixmap JpegSlave::pixmap( const QString& path, int wid, int hei) {
QImageIO iio( path, 0l );
+ if (wid < ImageInfo.getWidth() || hei<ImageInfo.getHeight()) {
+ odebug << "Scaling "<<ImageInfo.getWidth()<<"x"<<ImageInfo.getHeight()
+ << " to "<<wid<<"x"<<hei<< " ("<<path<<")"<<oendl;
QString str = QString( "Fast Shrink( 4 ) Scale( %1, %2, ScaleFree)" ).arg( wid ).arg( hei );
iio.setParameters( str.latin1() );// will be strdupped anyway
+ } else {
+ odebug << "Not scaling "<<ImageInfo.getWidth()<<"x"<<ImageInfo.getHeight()<< " ("<<path<<")"<<oendl;
+ }
img = iio.read() ? iio.image() : QImage();