Click here to Skip to main content
15,887,027 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
GeneralYou are welcome Pin
CPallini11-Oct-07 21:07
mveCPallini11-Oct-07 21:07 
AnswerRe: 16 bit RGB bmp to 8 bit grayscale bmp Pin
Nishad S10-Oct-07 0:17
Nishad S10-Oct-07 0:17 
In the 8 bit bmp a color table is used (of size 256 colors). So after you convert the color to gray (using the formula, Y = 0.3R + 0.59G + 0.11B) you have to keep it in a 256 element COLORREF array as a new color if it not added to the array yet. And the index of this array should be saved as the bitmap data. If the color idex is getting overflown ( > 255 ), then the index of a nearest existing color should be identified and the index should be used. For better result, when finding the nearest color, the occurance of that color should be considered. Means if 80% gray is coming 1 time and 81% is coming 20 times, then replacing the 80% to 81% is better. And dont forget to save the created color table also.

- NS -

GeneralRe: 16 bit RGB bmp to 8 bit grayscale bmp Pin
Deepu Antony10-Oct-07 2:45
Deepu Antony10-Oct-07 2:45 
GeneralRe: 16 bit RGB bmp to 8 bit grayscale bmp Pin
Nishad S10-Oct-07 3:35
Nishad S10-Oct-07 3:35 
GeneralRe: 16 bit RGB bmp to 8 bit grayscale bmp Pin
Deepu Antony10-Oct-07 4:40
Deepu Antony10-Oct-07 4:40 
GeneralRe: 16 bit RGB bmp to 8 bit grayscale bmp Pin
Mark Salsbery10-Oct-07 6:05
Mark Salsbery10-Oct-07 6:05 
GeneralRe: 16 bit RGB bmp to 8 bit grayscale bmp Pin
Deepu Antony10-Oct-07 17:46
Deepu Antony10-Oct-07 17:46 
GeneralRe: 16 bit RGB bmp to 8 bit grayscale bmp Pin
Mark Salsbery11-Oct-07 5:34
Mark Salsbery11-Oct-07 5:34 
GeneralRe: 16 bit RGB bmp to 8 bit grayscale bmp Pin
Deepu Antony11-Oct-07 8:35
Deepu Antony11-Oct-07 8:35 
GeneralRe: 16 bit RGB bmp to 8 bit grayscale bmp Pin
Mark Salsbery11-Oct-07 8:43
Mark Salsbery11-Oct-07 8:43 
Questionchar buffers Pin
Programm3r9-Oct-07 23:14
Programm3r9-Oct-07 23:14 
AnswerRe: char buffers Pin
Cedric Moonen9-Oct-07 23:17
Cedric Moonen9-Oct-07 23:17 
GeneralRe: char buffers Pin
Programm3r9-Oct-07 23:30
Programm3r9-Oct-07 23:30 
QuestionRe: char buffers Pin
David Crow10-Oct-07 3:02
David Crow10-Oct-07 3:02 
Question[SOLVED] Enabling a button after previous button click. Pin
CodingLover9-Oct-07 23:14
CodingLover9-Oct-07 23:14 
AnswerRe: Enabling a button after previous button click. Pin
Nelek9-Oct-07 23:19
protectorNelek9-Oct-07 23:19 
GeneralRe: Enabling a button after previous button click. Pin
CodingLover9-Oct-07 23:25
CodingLover9-Oct-07 23:25 
GeneralRe: Enabling a button after previous button click. Pin
Lakshmi_p9-Oct-07 23:39
Lakshmi_p9-Oct-07 23:39 
GeneralRe: Enabling a button after previous button click. Pin
CodingLover9-Oct-07 23:53
CodingLover9-Oct-07 23:53 

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.