summaryrefslogtreecommitdiff
path: root/noncore/multimedia/camera/zcameraio.cpp
Unidiff
Diffstat (limited to 'noncore/multimedia/camera/zcameraio.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/camera/zcameraio.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/noncore/multimedia/camera/zcameraio.cpp b/noncore/multimedia/camera/zcameraio.cpp
index 1c449e7..c940b45 100644
--- a/noncore/multimedia/camera/zcameraio.cpp
+++ b/noncore/multimedia/camera/zcameraio.cpp
@@ -272,47 +272,40 @@ bool ZCameraIO::snapshot( unsigned char* buf )
272 if ( _rot ) // Portrait 272 if ( _rot ) // Portrait
273 { 273 {
274 readmode = IMAGE | isFinderReversed() ? XFLIP | YFLIP : 0; 274 readmode = IMAGE | isFinderReversed() ? XFLIP | YFLIP : 0;
275 } 275 }
276 else // Landscape 276 else // Landscape
277 { 277 {
278 readmode = IMAGE | XFLIP | YFLIP; 278 readmode = IMAGE | XFLIP | YFLIP;
279 } 279 }
280 } 280 }
281 else // OVERRIDE 281 else // OVERRIDE
282 { 282 {
283 readmode = IMAGE | _flip; 283 readmode = IMAGE | _flip;
284 } 284 }
285 285
286 setReadMode( readmode ); 286 setReadMode( readmode );
287 read( (char*) buf, _readlen ); 287 read( (char*) buf, _readlen );
288 288
289} 289}
290 290
291 291
292void ZCameraIO::captureFrame( int w, int h, int zoom, QImage* image ) 292void ZCameraIO::captureFrame( int w, int h, int zoom, QImage* image )
293{ 293{
294 int pw = _width; 294 int pw = _width;
295 int ph = _height; 295 int ph = _height;
296 if ( _rot ) 296 setCaptureFrame( w, h, zoom*256, _rot );
297 setCaptureFrame( h, w, zoom*256, true );
298 else
299 setCaptureFrame( w, h, zoom*256, false );
300 snapshot( image ); 297 snapshot( image );
301 setCaptureFrame( pw, ph, _zoom, _rot ); 298 setCaptureFrame( pw, ph, _zoom, _rot );
302} 299}
303 300
304 301
305void ZCameraIO::captureFrame( int w, int h, int zoom, unsigned char* buf ) 302void ZCameraIO::captureFrame( int w, int h, int zoom, unsigned char* buf )
306{ 303{
307 //FIXME: this is too slow 304 //FIXME: this is too slow
308 int pw = _width; 305 int pw = _width;
309 int ph = _height; 306 int ph = _height;
310 if ( _rot ) 307 setCaptureFrame( w, h, zoom*256, _rot );
311 setCaptureFrame( h, w, zoom*256, true );
312 else
313 setCaptureFrame( w, h, zoom*256, false );
314
315 snapshot( buf ); 308 snapshot( buf );
316 setCaptureFrame( pw, ph, _zoom, _rot ); 309 setCaptureFrame( pw, ph, _zoom, _rot );
317} 310}
318 311