From: hackbard Date: Sat, 16 Nov 2002 16:04:59 +0000 (+0000) Subject: images X-Git-Url: https://hackdaworld.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c5049fe8999ca4efc7ef92793f9152e0d31421af;p=my-code%2Fivac.git images --- diff --git a/webcam.c b/webcam.c index e63c835..0cf1463 100644 --- a/webcam.c +++ b/webcam.c @@ -1,5 +1,5 @@ /* - * webcam.c - fetch data from webcam + * webcam.c - fetch data from webcam and display * * author: hackbard * @@ -15,12 +15,16 @@ #include #include #include "minirgb.h" -#include "ivac-logo.xpm" +// #include "images/ivac-logo.xpm" +// #include "images/ivac-logo.h" +#include "images/example_1.xbm" /* defines */ #define XBM_WIDTH 256 #define XBM_REAL_WIDTH 512 #define XBM_HEIGHT 256 +// #define ivac_logo pixel_data +#define ivac_logo example_1_bits /* global variables */ Display *display; @@ -108,8 +112,8 @@ void open_window(char *name,char *ivac_mask) { my_wm_hints.window_group=ivac_win; my_wm_hints.flags = StateHint | IconWindowHint | IconPositionHint | WindowGroupHint; - XSetWMHints(display,ivac_win,&my_wm_hints); - + // XSetWMHints(display,ivac_win,&my_wm_hints); + /* finaly ... map that stuff ;) */ XMapWindow(display,ivac_win); @@ -136,12 +140,16 @@ int main(int argc,char **argv) { exit(1); } - open_window(argv[0],ivac_logo); - + open_window(argv[0],(char *)ivac_logo); + minirgb_new(&rgb1,XBM_WIDTH,XBM_HEIGHT); + minirgb_new(&rgb2,XBM_WIDTH,XBM_HEIGHT); + minirgb_copy(&rgb2,&rgb1,0,0,XBM_WIDTH,XBM_HEIGHT,0,0); /* to be continued ... here is a test! */ XFlush(display); - sleep(5); + sleep(10); printf("blaaaa, schmaeee\n"); + XCloseDisplay(display); + return 0; }