Diffstat (limited to 'noncore/multimedia/camera/zcameraio.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/camera/zcameraio.cpp | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/noncore/multimedia/camera/zcameraio.cpp b/noncore/multimedia/camera/zcameraio.cpp index 56b2e13..51771a5 100644 --- a/noncore/multimedia/camera/zcameraio.cpp +++ b/noncore/multimedia/camera/zcameraio.cpp | |||
@@ -110,2 +110,3 @@ bool ZCameraIO::setCaptureFrame( int width, int height, int zoom, bool rot ) | |||
110 | { | 110 | { |
111 | odebug << "setCaptureFrame( " << width << ", " << height << ", " << zoom << ", " << rot << " )" << oendl; | ||
111 | char b[100]; | 112 | char b[100]; |
@@ -175,4 +176,17 @@ bool ZCameraIO::snapshot( QImage* image ) | |||
175 | { | 176 | { |
176 | setReadMode( IMAGE | XFLIP | YFLIP ); | 177 | setReadMode( STATUS ); |
177 | char buf[76800]; | 178 | |
179 | odebug << "finder reversed = " << isFinderReversed() << oendl; | ||
180 | odebug << "rotation = " << _rot << oendl; | ||
181 | |||
182 | if ( _rot ) // Portrait | ||
183 | { | ||
184 | setReadMode( IMAGE | isFinderReversed() ? XFLIP | YFLIP : 0 ); | ||
185 | } | ||
186 | else // Landscape | ||
187 | { | ||
188 | setReadMode( IMAGE | XFLIP | YFLIP ); //isFinderReversed() ? 0 : XFLIP ); | ||
189 | } | ||
190 | |||
191 | char buf[_readlen]; | ||
178 | char* bp = buf; | 192 | char* bp = buf; |
@@ -182,7 +196,7 @@ bool ZCameraIO::snapshot( QImage* image ) | |||
182 | 196 | ||
183 | image->create( 240, 160, 16 ); | 197 | image->create( _width, _height, 16 ); |
184 | for ( int i = 0; i < 160; ++i ) | 198 | for ( int i = 0; i < _height; ++i ) |
185 | { | 199 | { |
186 | p = image->scanLine( i ); | 200 | p = image->scanLine( i ); |
187 | for ( int j = 0; j < 240; j++ ) | 201 | for ( int j = 0; j < _width; j++ ) |
188 | { | 202 | { |