[Mono-list] LockBits() on Mono 2.2?

Stifu stifu at free.fr
Fri Mar 20 03:44:06 EDT 2009


Basically, I have an unsafe "FastBitmap" class which does LockBits(), then at
some point, since I can't draw the locked bitmap on screen directly, I clone
it then draw it...
This is on Linux (openSUSE, but it most likely affects all distros),
verified with Mono 2.2 and 2.4 RC3. Windows isn't affected, since it uses
the real GDI+ library rather than libgdiplus.


LKeene wrote:
> 
> Hi Stifu,
> Uh oh. 
> On what platform are you getting those (bad) results?
> 
> By "cloning" I'm assuming you are applying LockBits() to two bitmaps,
> stepping through the first and copying the bytes into the second, then
> unlocking? If its working on .NET but not Mono that's not a good sign. I
> was afraid of something like this. 
> 
> 
> Stifu wrote:
>> 
>> I found a certain GDI+ bug recently, and I *think* it's related to
>> LockBits(). I'm not sure, and didn't report the bug as I couldn't make a
>> reduced test case yet. However, if you're interested, I can send you my
>> not-so-reduced test case so you can have a look.
>> 
>> But to sum things up: I have a Bitmap, try to clone it, and the cloned
>> Bitmap is all black... while this works fine with .NET.
>> 
>> 
>> LKeene wrote:
>>> 
>>> Hello all, I have a general question regarding the use of LockBits() (in
>>> GDI+) for reading/writing to a bitmap.  I'm using Mono 2.2 and am
>>> targeting Windows, OSX and Linux. Any current issues concerning the use
>>> of LockBits()/UnlockBits() I should be aware of? Any nasty buggies I
>>> should be on the lookout for? I found a few posts pertaining to this but
>>> they're not very current. 
>>> 
>>> Thanks eveyone.
>>> 
>>> -L
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/LockBits%28%29-on-Mono-2.2--tp22611389p22615573.html
Sent from the Mono - General mailing list archive at Nabble.com.



More information about the Mono-list mailing list