author | alwin <alwin> | 2004-11-01 19:52:25 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-11-01 19:52:25 (UTC) |
commit | 2dc92f4bfe9e81edc2b0b24ecacf3bc44b344984 (patch) (unidiff) | |
tree | b1d5661ea64931b6eeb2030ceb22532cef699a75 /libopie2/opiemm/oimagescrollview.cpp | |
parent | 5a41dcd5901badbd2e258b0a916fb012b6351eeb (diff) | |
download | opie-2dc92f4bfe9e81edc2b0b24ecacf3bc44b344984.zip opie-2dc92f4bfe9e81edc2b0b24ecacf3bc44b344984.tar.gz opie-2dc92f4bfe9e81edc2b0b24ecacf3bc44b344984.tar.bz2 |
exif class added (taken from opie-eye_slave and more c++ like reworked)
it is used in oimageview while loading jpegs checking BEFORE loading if the
image should be scaled loaded.
ToDo: documentation of the interface, remove it from opie-eye_slave (it should
use of course the library version)
Diffstat (limited to 'libopie2/opiemm/oimagescrollview.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiemm/oimagescrollview.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libopie2/opiemm/oimagescrollview.cpp b/libopie2/opiemm/oimagescrollview.cpp index 56be10b..37a1ad5 100644 --- a/libopie2/opiemm/oimagescrollview.cpp +++ b/libopie2/opiemm/oimagescrollview.cpp | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <opie2/odebug.h> | 4 | #include <opie2/odebug.h> |
5 | #include <opie2/oapplication.h> | 5 | #include <opie2/oapplication.h> |
6 | #include <opie2/owait.h> | 6 | #include <opie2/owait.h> |
7 | #include <opie2/opieexif.h> | ||
7 | 8 | ||
8 | #include <qimage.h> | 9 | #include <qimage.h> |
9 | #include <qlayout.h> | 10 | #include <qlayout.h> |
@@ -87,6 +88,8 @@ void OImageScrollView::loadJpeg(bool interncall) | |||
87 | bool real_load = false; | 88 | bool real_load = false; |
88 | if (AutoScale()) { | 89 | if (AutoScale()) { |
89 | if (!interncall) { | 90 | if (!interncall) { |
91 | ExifData xf; | ||
92 | bool scanned = xf.scan(m_lastName); | ||
90 | int wid, hei; | 93 | int wid, hei; |
91 | wid = QApplication::desktop()->width(); | 94 | wid = QApplication::desktop()->width(); |
92 | hei = QApplication::desktop()->height(); | 95 | hei = QApplication::desktop()->height(); |
@@ -95,10 +98,13 @@ void OImageScrollView::loadJpeg(bool interncall) | |||
95 | } else { | 98 | } else { |
96 | hei = wid; | 99 | hei = wid; |
97 | } | 100 | } |
101 | if ( (scanned && (wid<xf.getWidth()||hei<xf.getHeight()))||!scanned ) { | ||
98 | param = QString( "Fast Shrink( 3 ) Scale( %1, %2, ScaleMin)" ).arg( wid ).arg( hei ); | 102 | param = QString( "Fast Shrink( 3 ) Scale( %1, %2, ScaleMin)" ).arg( wid ).arg( hei ); |
99 | odebug << "Load jpeg scaled \"" << param << "\"" << oendl; | 103 | odebug << "Load jpeg scaled \"" << param << "\"" << oendl; |
100 | iio.setParameters(param.latin1()); | 104 | iio.setParameters(param.latin1()); |
101 | setImageScaledLoaded(true); | 105 | setImageScaledLoaded(true); |
106 | } | ||
107 | |||
102 | real_load = true; | 108 | real_load = true; |
103 | } | 109 | } |
104 | } else { | 110 | } else { |