-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) { | |||
1415 | 1415 | ||
1416 | QPixmap JpegSlave::pixmap( const QString& path, int wid, int hei) { | 1416 | QPixmap JpegSlave::pixmap( const QString& path, int wid, int hei) { |
1417 | ExifData ImageInfo; | 1417 | ExifData ImageInfo; |
1418 | /* | ||
1419 | */ | ||
1418 | if ( !ImageInfo.scan( path ) || ImageInfo.isNullThumbnail() ) { | 1420 | if ( !ImageInfo.scan( path ) || ImageInfo.isNullThumbnail() ) { |
1419 | QImage img; | 1421 | QImage img; |
1420 | QImageIO iio( path, 0l ); | 1422 | QImageIO iio( path, 0l ); |
1423 | if (wid < ImageInfo.getWidth() || hei<ImageInfo.getHeight()) { | ||
1424 | odebug << "Scaling "<<ImageInfo.getWidth()<<"x"<<ImageInfo.getHeight() | ||
1425 | << " to "<<wid<<"x"<<hei<< " ("<<path<<")"<<oendl; | ||
1421 | QString str = QString( "Fast Shrink( 4 ) Scale( %1, %2, ScaleFree)" ).arg( wid ).arg( hei ); | 1426 | QString str = QString( "Fast Shrink( 4 ) Scale( %1, %2, ScaleFree)" ).arg( wid ).arg( hei ); |
1422 | iio.setParameters( str.latin1() );// will be strdupped anyway | 1427 | iio.setParameters( str.latin1() );// will be strdupped anyway |
1428 | } else { | ||
1429 | odebug << "Not scaling "<<ImageInfo.getWidth()<<"x"<<ImageInfo.getHeight()<< " ("<<path<<")"<<oendl; | ||
1430 | } | ||
1423 | img = iio.read() ? iio.image() : QImage(); | 1431 | img = iio.read() ? iio.image() : QImage(); |
1424 | return ThumbNailTool::scaleImage( img, wid,hei ); | 1432 | return ThumbNailTool::scaleImage( img, wid,hei ); |
1425 | }else{ | 1433 | }else{ |