views:

306

answers:

3

I have some code that does Bitmap manipulation using the LockBits method and accessing the bitmap data directly using a pointer. This code has to be wrapped in an unsafe block, of course, and I was wondering if this means that the code would not work in Mono.

I'm assuming the Bitmap class is available in Mono, but maybe that's another deal-breaker.

+4  A: 

Yes it can, and Mono has the Bitmap class.

arul
+5  A: 

Yes. Here's the Mono documentaiton on the unsafe keyword: http://go-mono.org/docs/index.aspx?link=ecmaspec%3A25

The Bitmap class is available as well. You can find the documentation here: http://go-mono.org/docs/index.aspx?tlink=35@ecma%3a1990%23Bitmap%2f. Just like in .NET Bitmaps inherits Image, which is nice.

Esteban Araya
+1  A: 

Yes, unsafe is available.

Mono even uses the unsafe keyword internally to try to speed up in some areas, such as BigInteger arithmetic in Mono.Security.

Marcus Griep