summaryrefslogtreecommitdiff
path: root/2003/i/buzz/src/camera/dumpimage.cc
diff options
context:
space:
mode:
authorschodet2003-09-10 20:13:52 +0000
committerschodet2003-09-10 20:13:52 +0000
commite40722474578d38fb31f4aa97af49904eda75544 (patch)
tree2259cd5b07ad12f2a8ed52a9354ab2bf8b256b25 /2003/i/buzz/src/camera/dumpimage.cc
parent5b1f702f012e9fcb0e64cdb6954759acc4c13e31 (diff)
Apr├ęs 2003.
Diffstat (limited to '2003/i/buzz/src/camera/dumpimage.cc')
-rw-r--r--2003/i/buzz/src/camera/dumpimage.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/2003/i/buzz/src/camera/dumpimage.cc b/2003/i/buzz/src/camera/dumpimage.cc
index e617c6a..90909af 100644
--- a/2003/i/buzz/src/camera/dumpimage.cc
+++ b/2003/i/buzz/src/camera/dumpimage.cc
@@ -3,6 +3,7 @@
// Copyright (C) 2003 Nicolas Schodet
//
#include "camera.h"
+#include "date/date.h"
#include <iomanip>
#include <unistd.h>
@@ -11,16 +12,17 @@ int
main (int argc, char **argv)
{
Camera cam;
- int w, h;
- cam.getSize (w, h);
- unsigned char *image = new unsigned char[w * h * 3];
+ Date date;
+ int w, h, d;
+ cam.getSize (w, h, d);
+ unsigned char *image = new unsigned char[w * h * d];
cout << hex;
int j = 0;
int pixel;
while (1)
{
cout << dec << "\n- " << j++ << hex << " ---------";
- while (cam.read (image) == 0) sleep (1);
+ while (cam.read (image) == 0);
for (int i = 0; i < 256; ++i)
{
if (!(i % 16))