Bitmapdata class

  • Thread starter Andreas Viklund via DotNetMonster.com
  • 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
 
P

Peter Foot [MVP]

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

Peter
 
A

Anthony Wong [MSFT]

NETCF will support LockBits() and BitmapData in V2.

Thanks,
Anthony

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top