-rw-r--r-- | noncore/graphics/opie-eye/slave/jpeg_slave.cpp | 8 |
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 @@ -1415,11 +1415,19 @@ QString JpegSlave::fullImageInfo( const QString& path) { QPixmap JpegSlave::pixmap( const QString& path, int wid, int hei) { ExifData ImageInfo; + /* + */ if ( !ImageInfo.scan( path ) || ImageInfo.isNullThumbnail() ) { QImage img; 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(); return ThumbNailTool::scaleImage( img, wid,hei ); }else{ |