Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

  • 3 weeks later...
Posted

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.

 

;)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...