summaryrefslogtreecommitdiff
path: root/noncore/multimedia/camera/lib
authormickeyl <mickeyl>2003-05-11 22:40:20 (UTC)
committer mickeyl <mickeyl>2003-05-11 22:40:20 (UTC)
commitc0b6d29485dad8f39873def7cd890613f60a631b (patch) (unidiff)
tree5a8f0190ce739f3ba9af597537058818c643b434 /noncore/multimedia/camera/lib
parent10de2c93dffa16f6d2f1cf72fa20008757c5ef3a (diff)
downloadopie-c0b6d29485dad8f39873def7cd890613f60a631b.zip
opie-c0b6d29485dad8f39873def7cd890613f60a631b.tar.gz
opie-c0b6d29485dad8f39873def7cd890613f60a631b.tar.bz2
command line capturer now seems to work
you can now write yourself a nice webcam application :)
Diffstat (limited to 'noncore/multimedia/camera/lib') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/camera/lib/zcameraio.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/noncore/multimedia/camera/lib/zcameraio.cpp b/noncore/multimedia/camera/lib/zcameraio.cpp
index c940b45..d59cbbb 100644
--- a/noncore/multimedia/camera/lib/zcameraio.cpp
+++ b/noncore/multimedia/camera/lib/zcameraio.cpp
@@ -139,6 +139,7 @@ bool ZCameraIO::setCaptureFrame( int width, int height, int zoom, bool rot )
139 _readlen = 2 * _width * _height; // camera is fixed @ 16 bits per pixel 139 _readlen = 2 * _width * _height; // camera is fixed @ 16 bits per pixel
140 return true; 140 return true;
141 } 141 }
142 owarn << "couldn't write to driver" << oendl;
142 return false; 143 return false;
143} 144}
144 145
@@ -215,6 +216,8 @@ bool ZCameraIO::snapshot( QImage* image )
215 odebug << "finder reversed = " << isFinderReversed() << oendl; 216 odebug << "finder reversed = " << isFinderReversed() << oendl;
216 odebug << "rotation = " << _rot << oendl; 217 odebug << "rotation = " << _rot << oendl;
217 218
219 odebug << "w=" << _width << " h= " << _height << " readlen= " << _readlen << oendl;
220
218 int readmode; 221 int readmode;
219 if ( _flip == -1 ) // AUTO 222 if ( _flip == -1 ) // AUTO
220 { 223 {
@@ -291,11 +294,12 @@ bool ZCameraIO::snapshot( unsigned char* buf )
291 294
292void ZCameraIO::captureFrame( int w, int h, int zoom, QImage* image ) 295void ZCameraIO::captureFrame( int w, int h, int zoom, QImage* image )
293{ 296{
297 int prot = _rot;
294 int pw = _width; 298 int pw = _width;
295 int ph = _height; 299 int ph = _height;
296 setCaptureFrame( w, h, zoom*256, _rot ); 300 setCaptureFrame( w, h, zoom*256, w<h );
297 snapshot( image ); 301 snapshot( image );
298 setCaptureFrame( pw, ph, _zoom, _rot ); 302 setCaptureFrame( pw, ph, _zoom, prot );
299} 303}
300 304
301 305