Remove full support for colour maps
Gets rid of a loooot of code and complexity.
Colour map clients are still supported through an
automatically generated map, but we lose the ability to
develop a client or server that uses colour maps
internally.
diff --git a/common/rfb/TightEncoder.cxx b/common/rfb/TightEncoder.cxx
index b94b53e..800d331 100644
--- a/common/rfb/TightEncoder.cxx
+++ b/common/rfb/TightEncoder.cxx
@@ -338,9 +338,9 @@
if (checkSolidTile(sr, &colorValue, false)) {
if (jpegSubsampling == subsampleGray && jpegQuality != -1) {
- Colour rgb;
- serverpf.rgbFromPixel(colorValue, NULL, &rgb);
- rdr::U32 lum = ((257 * rgb.r) + (504 * rgb.g) + (98 * rgb.b)
+ rdr::U16 r, g, b;
+ serverpf.rgbFromPixel(colorValue, &r, &g, &b);
+ rdr::U32 lum = ((257 * r) + (504 * g) + (98 * b)
+ 16500) / 1000;
colorValue = lum + (lum << 8) + (lum << 16);
}