Bug#366430: gnomemeeting: wrong colors (red and blue inverted?)
with my webcam
Ludovic Rousseau
ludovic.rousseau at free.fr
Sun Jul 9 11:35:39 UTC 2006
Le Friday 19 May 2006 à 21:31:52, Ludovic Rousseau a écrit:
> Le Sunday 14 May 2006 à 01:31:04, Ludovic Rousseau a écrit:
> > So I am prety sure the problem is NOT in gnomemeeting but in one of the
> > library used by gnomemeeting. But which one?
> >
> > I continue my exploration.
>
> Before I find the problem I propose an intermediate solution.
The proposed intermediate solution does not work well since the colors
are invcerted even when not needed.
I propose a new intermediate solution. The first byte of the image is
set to the magic value 42 when the colour are already fixed.
diff -ru gnomemeeting-1.2.3/src/main_window.cpp gnomemeeting-1.2.3.patched/src/main_window.cpp
--- gnomemeeting-1.2.3/src/main_window.cpp 2005-11-30 23:13:40.000000000 +0100
+++ gnomemeeting-1.2.3.patched/src/main_window.cpp 2006-06-03 12:14:33.000000000 +0200
@@ -2506,6 +2506,26 @@
gtk_accel_groups_activate (G_OBJECT (main_window), key, (GdkModifierType) 0);
}
+/* FIXME */
+void fix_colour (char *image, int x, int y)
+{
+ int i;
+ char tmp;
+ char *old = image;
+
+ if (42 == old[0])
+ return;
+
+ i = x * y;
+ while (--i) {
+ tmp = image[0];
+ image[0] = image[2];
+ image[2] = tmp;
+ image += 3;
+ }
+ old[0] = 42;
+}
+
void
gm_main_window_update_video (GtkWidget *main_window,
@@ -2585,6 +2605,7 @@
if (lf_width > 0 && lf_height > 0) {
+ fix_colour((char *)lbuffer, lf_width, lf_height);
lsrc_pic =
gdk_pixbuf_new_from_data (lbuffer, GDK_COLORSPACE_RGB,
FALSE, 8, lf_width, lf_height,
@@ -2608,6 +2629,7 @@
if (rf_width > 0 && rf_height > 0) {
+ fix_colour((char *)rbuffer, rf_width, rf_height);
rsrc_pic =
gdk_pixbuf_new_from_data (rbuffer, GDK_COLORSPACE_RGB,
FALSE, 8, rf_width, rf_height,
--
Dr. Ludovic Rousseau Ludovic.Rousseau at free.fr
-- Normaliser Unix c'est comme pasteuriser le camembert, L.R. --
More information about the Pkg-gnome-maintainers
mailing list