Click here to Skip to main content
15,899,679 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Help on saving bitmap to .bmp file Pin
Llasus8-Jul-07 19:48
Llasus8-Jul-07 19:48 
GeneralRe: Help on saving bitmap to .bmp file Pin
Hamid_RT8-Jul-07 20:44
Hamid_RT8-Jul-07 20:44 
GeneralRe: Help on saving bitmap to .bmp file Pin
Llasus8-Jul-07 21:11
Llasus8-Jul-07 21:11 
AnswerRe: Help on saving bitmap to .bmp file Pin
Paresh Chitte8-Jul-07 19:39
Paresh Chitte8-Jul-07 19:39 
GeneralRe: Help on saving bitmap to .bmp file Pin
Llasus8-Jul-07 19:54
Llasus8-Jul-07 19:54 
GeneralRe: Help on saving bitmap to .bmp file Pin
Paresh Chitte8-Jul-07 20:18
Paresh Chitte8-Jul-07 20:18 
GeneralRe: Help on saving bitmap to .bmp file Pin
Llasus8-Jul-07 20:21
Llasus8-Jul-07 20:21 
GeneralRe: Help on saving bitmap to .bmp file Pin
Naveen8-Jul-07 20:34
Naveen8-Jul-07 20:34 
Llasus wrote:
I'm just wondering why the bitmap won't work on other multiples besides 2 and 4



For bitmap's the pixels that represent one row should be a multiple of four.

Suppose you have a bitmap of bit dept 24 and width 150. In that case the total byte required to represent on row is

( 24/8 )*150 = 450. But this is not divisible by four. In this case you have to add dummy bytes in the end of each row. In the above example the number of dummy bytes will be

int nBytesNeed = 4 - (450%4);// = 2

so append a 2 bytes at the end of each row. Thus for each row the number of bytes will be 452.


GeneralRe: Help on saving bitmap to .bmp file Pin
Llasus8-Jul-07 20:40
Llasus8-Jul-07 20:40 
QuestionHow do I access the pixels on the screen to read them? Pin
sbscb8-Jul-07 18:07
sbscb8-Jul-07 18:07 
AnswerRe: How do I access the pixels on the screen to read them? Pin
Hamid_RT8-Jul-07 19:15
Hamid_RT8-Jul-07 19:15 
AnswerRe: How do I access the pixels on the screen to read them? Pin
Llasus8-Jul-07 19:22
Llasus8-Jul-07 19:22 
GeneralRe: How do I access the pixels on the screen to read them? Pin
Perspx8-Jul-07 19:33
Perspx8-Jul-07 19:33 
GeneralRe: How do I access the pixels on the screen to read them? Pin
Llasus8-Jul-07 19:51
Llasus8-Jul-07 19:51 
GeneralRe: How do I access the pixels on the screen to read them? Pin
Perspx9-Jul-07 5:42
Perspx9-Jul-07 5:42 
Questionneed help Pin
gentleguy8-Jul-07 17:23
gentleguy8-Jul-07 17:23 
QuestionRe: need help Pin
Hamid_RT8-Jul-07 19:24
Hamid_RT8-Jul-07 19:24 
AnswerRe: need help Pin
Llasus8-Jul-07 20:02
Llasus8-Jul-07 20:02 
AnswerOnce again...THE RULES Pin
leckey9-Jul-07 4:11
leckey9-Jul-07 4:11 
Questionhow do I write to cmd prompt (yeah cout) Pin
devvvy8-Jul-07 16:24
devvvy8-Jul-07 16:24 
AnswerRe: how do I write to cmd prompt (yeah cout) Pin
Naveen8-Jul-07 16:56
Naveen8-Jul-07 16:56 
QuestionHow do I find keyboard 'devide identifiers' list for LoadKeyboardLayout() function ? Pin
vilius_m8-Jul-07 11:40
vilius_m8-Jul-07 11:40 
QuestionOpenProccess Failure Pin
Jebus898-Jul-07 10:39
Jebus898-Jul-07 10:39 
QuestionRe: OpenProccess Failure Pin
Perspx8-Jul-07 10:41
Perspx8-Jul-07 10:41 
AnswerRe: OpenProccess Failure Pin
Jebus898-Jul-07 10:48
Jebus898-Jul-07 10:48 

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.