Google Answers Logo
View Question
 
Q: How to Display a black and white image using 16 bit grayscale w/ DirectX ( No Answer,   0 Comments )
Question  
Subject: How to Display a black and white image using 16 bit grayscale w/ DirectX
Category: Computers > Programming
Asked by: snoop911-ga
List Price: $2.00
Posted: 19 Nov 2005 13:32 PST
Expires: 19 Dec 2005 13:32 PST
Question ID: 595229
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);
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy