kotai
09-03-2007, 05:00 PM
Hi
I need convert a 16bits color to RGB.
I have this code:
ColorPixel := DXImageList.Items[1].PatternSurfaces[0].Pixel[X,Y];
R := GetRValue(ColorPixel);
G := GetGValue(ColorPixel);
B := GetBValue(ColorPixel);
ColorPixel := ColorToRGB(DXImageList.Items[1].PatternSurfaces[0].Pixel[X,Y]); --> same results.
if Windows are in 32bits color work fine, but when Windows are in 16bits color not work fine, Blue always is 0 and Red and Green ara more value:
Example:
in 32 bits color one pixel:
Results:
ColorPixel = 9005609 --> 896A29
R = 41 --> 29
G = 106 --> 6A
B = 137 --> 89
in 16 bits color (same pixel)
Results:
ColorPixel = 35653 --> 8B45
R = 69
G = 139
B = 0
Can I convert 16 bits color to 24 bits color ?
Thanks
I need convert a 16bits color to RGB.
I have this code:
ColorPixel := DXImageList.Items[1].PatternSurfaces[0].Pixel[X,Y];
R := GetRValue(ColorPixel);
G := GetGValue(ColorPixel);
B := GetBValue(ColorPixel);
ColorPixel := ColorToRGB(DXImageList.Items[1].PatternSurfaces[0].Pixel[X,Y]); --> same results.
if Windows are in 32bits color work fine, but when Windows are in 16bits color not work fine, Blue always is 0 and Red and Green ara more value:
Example:
in 32 bits color one pixel:
Results:
ColorPixel = 9005609 --> 896A29
R = 41 --> 29
G = 106 --> 6A
B = 137 --> 89
in 16 bits color (same pixel)
Results:
ColorPixel = 35653 --> 8B45
R = 69
G = 139
B = 0
Can I convert 16 bits color to 24 bits color ?
Thanks