Implement new colorspaces to allow directly compressing from/decompressing to RGB/RGBX/BGR/BGRX/XBGR/XRGB without conversion



git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3744 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/common/jpeg/jquant1.c b/common/jpeg/jquant1.c
index b2f96aa..eac65a3 100644
--- a/common/jpeg/jquant1.c
+++ b/common/jpeg/jquant1.c
@@ -193,7 +193,10 @@
   int total_colors, iroot, i, j;
   boolean changed;
   long temp;
-  static const int RGB_order[3] = { RGB_GREEN, RGB_RED, RGB_BLUE };
+  int RGB_order[3] = { RGB_GREEN, RGB_RED, RGB_BLUE };
+  RGB_order[0] = rgb_green[cinfo->out_color_space];
+  RGB_order[1] = rgb_red[cinfo->out_color_space];
+  RGB_order[2] = rgb_blue[cinfo->out_color_space];
 
   /* We can allocate at least the nc'th root of max_colors per component. */
   /* Compute floor(nc'th root of max_colors). */