Click here to Skip to main content
15,924,038 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: VC++ Standard and Unicode Pin
Michael Dunn30-Oct-01 17:07
sitebuilderMichael Dunn30-Oct-01 17:07 
GeneralRe: VC++ Standard and Unicode Pin
Matt Newman31-Oct-01 11:23
Matt Newman31-Oct-01 11:23 
GeneralRe: VC++ Standard and Unicode Pin
Michael Dunn31-Oct-01 17:06
sitebuilderMichael Dunn31-Oct-01 17:06 
GeneralRe: VC++ Standard and Unicode Pin
Matt Newman1-Nov-01 13:30
Matt Newman1-Nov-01 13:30 
QuestionHow to get the bits from a DIB? Pin
clintsinger30-Oct-01 14:22
clintsinger30-Oct-01 14:22 
AnswerRe: How to get the bits from a DIB? Pin
Christian Graus30-Oct-01 14:37
protectorChristian Graus30-Oct-01 14:37 
GeneralRe: How to get the bits from a DIB? Pin
clintsinger31-Oct-01 6:03
clintsinger31-Oct-01 6:03 
GeneralRe: How to get the bits from a DIB? Pin
Chris Losinger31-Oct-01 6:22
professionalChris Losinger31-Oct-01 6:22 
see the MSDN for BITMAPINFOHEADER . you have to understand how DIBs are setup, in order for you to be able to get at the pixels.

here it is in a nutshell:

a 24 bit DIB (one of the simplest of the DIBs) is usually a chunk of memory that starts with a BITMAPINFOHEADER structure. immediately after that struct are the pixel bytes.

pixel rows are generally stored in a bottom-up order, so the first pixel byte is the bottom-left pixel. (top-down DIBs have a negative height).

pixel rows are always a multiple of four bytes wide; they have padding bytes at the end, if necessary, to make the total number of row bytes equal to a multiple of four.

pixels are stored BGRBGRBGR... (Blue, Green, Red). three pixels per byte, no padding between pixels (except at row ends, when necessary).

-c



http://www.smalleranimals.com

GeneralBetter than the Startup folder Pin
Jason Hooper30-Oct-01 14:12
Jason Hooper30-Oct-01 14:12 
GeneralRe: Better than the Startup folder Pin
Christian Graus30-Oct-01 15:03
protectorChristian Graus30-Oct-01 15:03 
GeneralRe: Better than the Startup folder Pin
Michael Martin30-Oct-01 15:42
professionalMichael Martin30-Oct-01 15:42 
GeneralRe: Better than the Startup folder Pin
Nish Nishant30-Oct-01 16:18
sitebuilderNish Nishant30-Oct-01 16:18 
GeneralRe: Better than the Startup folder Pin
Jason Hooper30-Oct-01 23:32
Jason Hooper30-Oct-01 23:32 
GeneralRe: Better than the Startup folder Pin
solex30-Oct-01 23:37
solex30-Oct-01 23:37 
GeneralRe: Better than the Startup folder Pin
Rick Crone31-Oct-01 9:21
Rick Crone31-Oct-01 9:21 
GeneralStrange owner-draw CButton problem... Pin
Simon Walton30-Oct-01 13:39
Simon Walton30-Oct-01 13:39 
GeneralResizing Icon In CRichEditView Pin
Vinnie Drysdale30-Oct-01 12:18
Vinnie Drysdale30-Oct-01 12:18 
GeneralDebug symbols for WinXP Pin
Sam C30-Oct-01 11:00
Sam C30-Oct-01 11:00 
QuestionHow to get browser version? Pin
30-Oct-01 9:34
suss30-Oct-01 9:34 
AnswerRe: How to get browser version? Pin
Michael Dunn30-Oct-01 11:34
sitebuilderMichael Dunn30-Oct-01 11:34 
GeneralOpenGL Animation Pin
30-Oct-01 8:51
suss30-Oct-01 8:51 
GeneralRe: OpenGL Animation Pin
Todd Smith30-Oct-01 8:57
Todd Smith30-Oct-01 8:57 
GeneralRe: OpenGL Animation Pin
30-Oct-01 9:12
suss30-Oct-01 9:12 
GeneralRe: OpenGL Animation Pin
30-Oct-01 10:11
suss30-Oct-01 10:11 
Generaloverload operator... a begginner info Pin
Remi Morin30-Oct-01 8:31
Remi Morin30-Oct-01 8:31 

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.