author | mickeyl <mickeyl> | 2003-05-11 22:40:20 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-05-11 22:40:20 (UTC) |
commit | c0b6d29485dad8f39873def7cd890613f60a631b (patch) (side-by-side diff) | |
tree | 5a8f0190ce739f3ba9af597537058818c643b434 /noncore/multimedia/camera/lib/zcameraio.cpp | |
parent | 10de2c93dffa16f6d2f1cf72fa20008757c5ef3a (diff) | |
download | opie-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/zcameraio.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/camera/lib/zcameraio.cpp | 8 |
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 @@ -136,12 +136,13 @@ bool ZCameraIO::setCaptureFrame( int width, int height, int zoom, bool rot ) _height = height; _zoom = zoom; _rot = rot; _readlen = 2 * _width * _height; // camera is fixed @ 16 bits per pixel return true; } + owarn << "couldn't write to driver" << oendl; return false; } bool ZCameraIO::setZoom( int zoom ) { @@ -212,12 +213,14 @@ bool ZCameraIO::snapshot( QImage* image ) { setReadMode( STATUS ); odebug << "finder reversed = " << isFinderReversed() << oendl; odebug << "rotation = " << _rot << oendl; + odebug << "w=" << _width << " h= " << _height << " readlen= " << _readlen << oendl; + int readmode; if ( _flip == -1 ) // AUTO { if ( _rot ) // Portrait { readmode = IMAGE | isFinderReversed() ? XFLIP | YFLIP : 0; @@ -288,17 +291,18 @@ bool ZCameraIO::snapshot( unsigned char* buf ) } void ZCameraIO::captureFrame( int w, int h, int zoom, QImage* image ) { + int prot = _rot; int pw = _width; int ph = _height; - setCaptureFrame( w, h, zoom*256, _rot ); + setCaptureFrame( w, h, zoom*256, w<h ); snapshot( image ); - setCaptureFrame( pw, ph, _zoom, _rot ); + setCaptureFrame( pw, ph, _zoom, prot ); } void ZCameraIO::captureFrame( int w, int h, int zoom, unsigned char* buf ) { //FIXME: this is too slow |