Bug#366430: gnomemeeting: wrong colors (red and blue inverted?)
with my webcam
Ludovic Rousseau
ludovic.rousseau at free.fr
Fri May 19 19:31:52 UTC 2006
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.
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-05-19 21:19:11.000000000 +0200
@@ -2506,6 +2506,20 @@
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;
+ i = x * y;
+ while (--i) {
+ tmp = image[0];
+ image[0] = image[2];
+ image[2] = tmp;
+ image += 3;
+ }
+}
+
void
gm_main_window_update_video (GtkWidget *main_window,
@@ -2585,6 +2599,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 +2623,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-voip-maintainers
mailing list