Im displaying a grayscale image (black and white) using 8 bits. I am
able to display a nice gradient from black to white in 256 steps.
video_buffer = (_uchar8)ddsd.lpSurface;
video_buffer[ row * bytes_per_line + col] = RGB( col , col, col);
//Use the same value for red, green blue to get b&w
Now, I would like to display another image (black & white grayscale)
using 16 bits per pixel. How do I display a grayscale to go from pure
black to pure white with 16 bits of resolution (2^16 steps)?
I tried this, but it didnt work:
video_buffer = (_ushort16)ddsd.lpSurface;
video_buffer[ row * bytes_per_line + col] = _RGB16BIT( col , col, col); |