Bitmapdata class

  • Thread starter Thread starter Andreas Viklund via DotNetMonster.com
  • Start date Start date
A

Andreas Viklund via DotNetMonster.com

Hello!

I am developing an application that is going to manipulate images collected
from a mobile camera och web camera. I have discovered that Setpixel and
Getpixel is extremely slow and therefor tried to find some other way to get
the pixelvalues from an image.

I found some source code where they used Unsafe code to access the bitmap
data directly. They used LockBits() and BitMapData and this would be much
more faster than get/setpixel. (The article:
http://msdn.microsoft.com/library/default.asp?url=/library/en-
us/dncscol/html/csharp11152001.asp )


I copied the code to my application, and everything worked ok. Except for
one thing: The Compact Framework does not include the class BitmapData! It
is so frustrating...

Is there a way to go around this problem? Could you use something else
instead of the bitmapdata? like, build an array or something?

I have read alot about this and it looks like setpixel and getpixel is the
only way to access an image in compact framework. Or have anyone got a
better solution?


Best regards

Andreas Viklund
 
Have a look at the OpenNETCF.Drawing.BitmapEx class which does allow you to
LockBits (and more)

Peter
 
NETCF will support LockBits() and BitmapData in V2.

Thanks,
Anthony

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top