views:

242

answers:

2

I found a wonderful open source Java program that I'm translating into C#. The built-in translator in Visual Studio got me started and I've now spent about a month translating the rest manually line by line. I've completed over 15,000 lines of translation and the only thing that remains is trying to figure out how to convert their MemoryImageSource stuff into C#/.NET.

What's the .NET equivalent way of implementing this stuff? Is there a native .NET library already?

+3  A: 

The standard .NET System.Drawing.Bitmap class in the System.Drawing.dll assembly comes close to what I know of the MemoryImageSource (i.e., an image represented as an array of pixels that you can manipulate).

For better performance, you can use the ImageTraverser class from CodeProject, which accessses the array through unmanaged pointers.

Mark Cidade
+1  A: 

Look at the System.Drawing namespace. This wraps the standard windows GDI+ native code.

System.Drawing.BitMap is probably what you want.

FlySwat