Help in extracting actual pixel data from bitmap object

starzzzzz

New member
Joined
Feb 24, 2004
Messages
1
Hi all.

I am having some problems with my project and hope someone could help me.

From my understanding of Bitmap, bitmap object consists of 4 parts: BITMAPFLEHEADER, BITMAPFILEINFO, palette information and the actual pixel data.

I have a method that takes in only the pixel data of the bitmap object as agruement. But i have no idea on how to exract/retrieve the pixel data from the bitmap object.

Anyone can help me? Code can be either in C# or C++.

Thanks in advance. :D
 
GDI vs byte arrays

Frist approach,

use the GDI function GetPixel from the bitmap object

Better approach,

If you need to access to the pixel several times use a byte array to store the bitmap information and then read the position is 12 times faster than using the GDI bitmap object.

;)
 
Back
Top