[Mono-list] LockBits() on Mono 2.2?
Dan Shryock
dan.shryock at gmail.com
Fri Mar 20 12:26:04 EDT 2009
On Fri, Mar 20, 2009 at 8:40 AM, LKeene <lionel.keene at gmail.com> wrote:
>
> I actually intend to use it to draw to a memory bitmap pixel-by-pixel, rather
> than calling SetPixel() each time. Apparently that would be extremely slow
> form what I've read online. The only alternative to Set/GetPixel() seems to
> be declaring an unsafe block and using LockBits(). I'll try to test the mono
> LockBits() implementation today, but assuming that there is indeed a bug,
> does anyone have any other ideas of how to accomplish drawing to a memory
> Bitmap other than SetPixel()? I have a precomputed "Color[,]" that specifies
> the pixels colors.
In a recent project, I had no troubles working with lockbits on Mono
1.9 on linux.
In the past, using some older version of Mono (probably 1.1.x or 1.2.x) I had
encountered few troubles working with lockbits but they have been resolved in
newer Mono releases.
Another thing that I noticed is that calling SetPixel repeatedly on Microsoft's
.NET is much slower than calling SetPixel repeatedly on Mono (though lockbits
was still faster on both).
HTH
Dan
More information about the Mono-list
mailing list