Click here to Skip to main content
15,913,669 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralFormule founded Pin
Nelek10-Oct-07 20:36
protectorNelek10-Oct-07 20:36 
GeneralRe: how to make bitmap display independent of Device Display Setting Pin
Mark Salsbery11-Oct-07 5:40
Mark Salsbery11-Oct-07 5:40 
Sharath Jagannath wrote:
But How do I Display grayscale Image... without up-sampling

Your example was 8-bit grayscale, right?  If you make a DIB with that data,
the DIB's color table should have 256 shades of gray, corresponding to the 256
possible pixel values.  When you draw the bitmap to a 16,24,or 32-bitperpixel
display, the bitmap pixels will be mapped through the color table and the
resulting RGB value from the table will be drawn on the screen.

You only need to resample if you need to downsample, like to a palette based
video mode.  These days, that is rare.



Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

QuestionHow to track windows messages of a 3rd party app Pin
dudedotnet9-Oct-07 23:54
dudedotnet9-Oct-07 23:54 
AnswerRe: How to track windows messages of a 3rd party app Pin
Matthew Faithfull10-Oct-07 0:50
Matthew Faithfull10-Oct-07 0:50 
GeneralRe: How to track windows messages of a 3rd party app Pin
dudedotnet10-Oct-07 0:56
dudedotnet10-Oct-07 0:56 
GeneralRe: How to track windows messages of a 3rd party app Pin
Matthew Faithfull10-Oct-07 1:04
Matthew Faithfull10-Oct-07 1:04 
GeneralRe: How to track windows messages of a 3rd party app Pin
dudedotnet10-Oct-07 1:17
dudedotnet10-Oct-07 1:17 
GeneralRe: How to track windows messages of a 3rd party app Pin
Matthew Faithfull10-Oct-07 1:55
Matthew Faithfull10-Oct-07 1:55 
GeneralRe: How to track windows messages of a 3rd party app Pin
dudedotnet10-Oct-07 1:58
dudedotnet10-Oct-07 1:58 
QuestionAt a Single console Pin
Jhony george9-Oct-07 23:54
Jhony george9-Oct-07 23:54 
GeneralRe: At a Single console Pin
Matthew Faithfull10-Oct-07 0:34
Matthew Faithfull10-Oct-07 0:34 
GeneralRe: At a Single console Pin
Jhony george10-Oct-07 0:36
Jhony george10-Oct-07 0:36 
QuestionAceesing Microsoft Acess through ODBC Pin
Deepu Antony9-Oct-07 23:43
Deepu Antony9-Oct-07 23:43 
AnswerRe: Aceesing Microsoft Acess through ODBC Pin
David Crow10-Oct-07 3:01
David Crow10-Oct-07 3:01 
QuestionOnSize() of CWnd Pin
prithaa9-Oct-07 23:41
prithaa9-Oct-07 23:41 
AnswerRe: OnSize() of CWnd Pin
Jhony george9-Oct-07 23:47
Jhony george9-Oct-07 23:47 
GeneralRe: OnSize() of CWnd Pin
prithaa9-Oct-07 23:53
prithaa9-Oct-07 23:53 
AnswerRe: OnSize() of CWnd Pin
Nelek10-Oct-07 0:57
protectorNelek10-Oct-07 0:57 
GeneralRe: OnSize() of CWnd Pin
prithaa10-Oct-07 3:21
prithaa10-Oct-07 3:21 
GeneralRe: OnSize() of CWnd Pin
Nelek10-Oct-07 20:34
protectorNelek10-Oct-07 20:34 
QuestionHow to Create Local Machine User? Pin
narayanagvs9-Oct-07 23:39
narayanagvs9-Oct-07 23:39 
AnswerRe: How to Create Local Machine User? Pin
Nelek10-Oct-07 0:50
protectorNelek10-Oct-07 0:50 
Question16 bit RGB bmp to 8 bit grayscale bmp Pin
Deepu Antony9-Oct-07 23:30
Deepu Antony9-Oct-07 23:30 
AnswerRe: 16 bit RGB bmp to 8 bit grayscale bmp Pin
CPallini9-Oct-07 23:47
mveCPallini9-Oct-07 23:47 
GeneralRe: 16 bit RGB bmp to 8 bit grayscale bmp Pin
Deepu Antony11-Oct-07 8:36
Deepu Antony11-Oct-07 8:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.