Add ability to directly convert between two pixel formats
This is a lot easier and cheaper than having to set up a complete
PixelTransformer object.
diff --git a/common/rfb/PixelFormat.h b/common/rfb/PixelFormat.h
index db12988..b18045f 100644
--- a/common/rfb/PixelFormat.h
+++ b/common/rfb/PixelFormat.h
@@ -75,6 +75,14 @@
void rgbFromBuffer(rdr::U8* dst, const rdr::U8* src,
int w, int stride, int h) const;
+ Pixel pixelFromPixel(const PixelFormat &srcPF, Pixel src) const;
+
+ void bufferFromBuffer(rdr::U8* dst, const PixelFormat &srcPF,
+ const rdr::U8* src, int pixels) const;
+ void bufferFromBuffer(rdr::U8* dst, const PixelFormat &srcPF,
+ const rdr::U8* src, int w, int h,
+ int dstStride, int srcStride) const;
+
void print(char* str, int len) const;
bool parse(const char* str);