From 025ebf177397eba6e6271a69f363ff7d73ec6993 Mon Sep 17 00:00:00 2001 From: Nicolas Graziano Date: Tue, 25 Oct 2011 04:12:57 +0200 Subject: [PATCH] Try to get good color for 8 Bpp and 15 Bpp. The method is try and correct for 8, 15, 16 24 and 32. I made all this change in freerdp_color_convert_rgb to prevent blue = clrconv->palette->entries[srcColor].red --- libfreerdp-codec/color.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libfreerdp-codec/color.c b/libfreerdp-codec/color.c index 21b505466..cb8862698 100644 --- a/libfreerdp-codec/color.c +++ b/libfreerdp-codec/color.c @@ -97,7 +97,7 @@ uint32 freerdp_color_convert_rgb(uint32 srcColor, int srcBpp, int dstBpp, HCLRCO case 32: if (clrconv->alpha) { - GetABGR32(alpha, red, green, blue, srcColor); + GetARGB32(alpha, red, green, blue, srcColor); } else { @@ -108,10 +108,10 @@ uint32 freerdp_color_convert_rgb(uint32 srcColor, int srcBpp, int dstBpp, HCLRCO GetBGR24(red, green, blue, srcColor); break; case 16: - GetRGB16(red, green, blue, srcColor); + GetBGR16(red, green, blue, srcColor); break; case 15: - GetRGB15(red, green, blue, srcColor); + GetBGR15(red, green, blue, srcColor); break; case 8: srcColor &= 0xFF; @@ -133,7 +133,7 @@ uint32 freerdp_color_convert_rgb(uint32 srcColor, int srcBpp, int dstBpp, HCLRCO switch (dstBpp) { case 32: - dstColor = ARGB32(alpha, red, green, blue); + dstColor = ABGR32(alpha, red, green, blue); break; case 24: dstColor = BGR24(red, green, blue); @@ -372,7 +372,7 @@ uint8* freerdp_image_convert_15bpp(uint8* srcData, uint8* dstData, int width, in { pixel = *src16; src16++; - GetBGR16(red, green, blue, pixel); + GetBGR15(red, green, blue, pixel); pixel = BGR32(red, green, blue); *dst32 = pixel; dst32++;