96b2b15
--- camorama-0.19/src/callbacks.c	2007-09-16 15:36:55.000000000 +0200
96b2b15
+++ camorama-0.19.new/src/callbacks.c	2008-06-29 22:22:44.000000000 +0200
96b2b15
@@ -387,9 +387,6 @@
96b2b15
         }
96b2b15
     }
96b2b15
 
96b2b15
-    cam->pixmap = gdk_pixmap_new (NULL, cam->x, cam->y, cam->desk_depth);
96b2b15
-    gtk_widget_set_size_request (glade_xml_get_widget (cam->xml, "da"),
96b2b15
-                                 cam->x, cam->y);
96b2b15
 
96b2b15
     /*
96b2b15
      * if(cam->read == FALSE) {
96b2b15
@@ -441,6 +438,11 @@
96b2b15
      * * } 
96b2b15
      */
96b2b15
     get_win_info (cam);
96b2b15
+
96b2b15
+    cam->pixmap = gdk_pixmap_new (NULL, cam->x, cam->y, cam->desk_depth);
96b2b15
+    gtk_widget_set_size_request (glade_xml_get_widget (cam->xml, "da"),
96b2b15
+                                 cam->x, cam->y);
96b2b15
+
96b2b15
     frame = 0;
96b2b15
     gtk_window_resize (GTK_WINDOW
96b2b15
                        (glade_xml_get_widget (cam->xml, "main_window")), 320,
96b2b15
@@ -520,8 +522,14 @@
96b2b15
     gtk_widget_show (about);
96b2b15
 }
96b2b15
 
96b2b15
+void
96b2b15
+camorama_filter_color_filter(void* filter, guchar *image, int x, int y, int depth);
96b2b15
+
96b2b15
 static void
96b2b15
 apply_filters(cam* cam) {
96b2b15
+	/* v4l has reverse rgb order from what camora expect so call the color
96b2b15
+	   filter to fix things up before running the user selected filters */
96b2b15
+	camorama_filter_color_filter(NULL, cam->pic_buf, cam->x, cam->y, cam->depth);
96b2b15
 	camorama_filter_chain_apply(cam->filter_chain, cam->pic_buf, cam->x, cam->y, cam->depth);
96b2b15
 #warning "FIXME: enable the threshold channel filter"
96b2b15
 //	if((effect_mask & CAMORAMA_FILTER_THRESHOLD_CHANNEL)  != 0) 
96b2b15
--- camorama-0.19/src/filter.c	2007-09-16 14:48:50.000000000 +0200
96b2b15
+++ camorama-0.19.new/src/filter.c	2008-06-29 22:11:42.000000000 +0200
96b2b15
@@ -151,12 +151,12 @@
96b2b15
 static void
96b2b15
 camorama_filter_color_init(CamoramaFilterColor* self) {}
96b2b15
 
96b2b15
-static void
96b2b15
+void
96b2b15
 camorama_filter_color_filter(CamoramaFilterColor* filter, guchar *image, int x, int y, int depth) {
96b2b15
 	int i;
96b2b15
 	char tmp;
96b2b15
 	i = x * y;
96b2b15
-	while (--i) {
96b2b15
+	while (i--) {
96b2b15
 		tmp = image[0];
96b2b15
 		image[0] = image[2];
96b2b15
 		image[2] = tmp;
96b2b15
--- camorama-0.19/src/main.c	2007-09-16 15:36:55.000000000 +0200
96b2b15
+++ camorama-0.19.new/src/main.c	2008-06-29 22:20:04.000000000 +0200
96b2b15
@@ -224,8 +224,7 @@
96b2b15
 
96b2b15
     /* get picture attributes */
96b2b15
     get_pic_info (cam);
96b2b15
-//	set_pic_info(cam);
96b2b15
-    /* set_pic_info(cam); */
96b2b15
+    set_pic_info (cam);
96b2b15
     cam->contrast = cam->vid_pic.contrast;
96b2b15
     cam->brightness = cam->vid_pic.brightness;
96b2b15
     cam->colour = cam->vid_pic.colour;
96b2b15
--- camorama-0.19/src/v4l.c	2007-09-16 14:48:05.000000000 +0200
96b2b15
+++ camorama-0.19.new/src/v4l.c	2008-06-29 22:20:23.000000000 +0200
96b2b15
@@ -158,8 +158,8 @@
96b2b15
 	if(cam->debug) {
96b2b15
 		g_message("SET PIC");
96b2b15
 	}
96b2b15
-	//cam->vid_pic.palette = VIDEO_PALETTE_RGB24;
96b2b15
-	//cam->vid_pic.depth = 24;
96b2b15
+	cam->vid_pic.palette = VIDEO_PALETTE_RGB24;
96b2b15
+	cam->vid_pic.depth = 24;
96b2b15
 	//cam->vid_pic.palette = VIDEO_PALETTE_YUV420P;
96b2b15
 	if(ioctl(cam->dev, VIDIOCSPICT, &cam->vid_pic) == -1) {
96b2b15
 		if(cam->debug) {
96b2b15
@@ -232,6 +232,8 @@
96b2b15
       exit(0);
96b2b15
    }
96b2b15
 
96b2b15
+   cam->x = cam->vid_win.width;
96b2b15
+   cam->y = cam->vid_win.height;
96b2b15
 }
96b2b15
 
96b2b15
 void set_buffer(cam * cam)
96b2b15
--- camorama-0.19/src/camorama-window.c~	2007-09-16 15:36:55.000000000 +0200
96b2b15
+++ camorama-0.19/src/camorama-window.c	2009-06-23 20:19:16.000000000 +0200
96b2b15
@@ -209,11 +209,7 @@ load_interface(cam* cam) {
96b2b15
 
96b2b15
     logo = gtk_icon_theme_load_icon(gtk_icon_theme_get_for_screen(gtk_widget_get_screen(glade_xml_get_widget(cam->xml, "main_window"))), CAMORAMA_STOCK_WEBCAM, 24, 0, NULL);
96b2b15
     gtk_window_set_default_icon(logo);
96b2b15
-    logo = (GdkPixbuf *) create_pixbuf (PACKAGE_DATA_DIR "/pixmaps/camorama.png");
96b2b15
-    if (logo == NULL) {
96b2b15
-        printf ("\n\nLOGO NO GO\n\n");
96b2b15
-    }
96b2b15
-
96b2b15
+    logo = gtk_icon_theme_load_icon(gtk_icon_theme_get_for_screen(gtk_widget_get_screen(glade_xml_get_widget(cam->xml, "main_window"))), "camorama", 48, 0, NULL);
96b2b15
     if (cam->show_adjustments == FALSE) {
96b2b15
         gtk_widget_hide (glade_xml_get_widget
96b2b15
                          (cam->xml, "adjustments_table"));