[Mono-devel-list] [Patch] System.Drawing.Bitmap .NET Framework compatibility

Jordi Mas jordi at ximian.com
Sat May 14 11:00:50 EDT 2005

El ds 14 de 05 del 2005 a les 12:14 +0200, en/na Kornél Pál va escriure:
> Hi,
> System.Drawing.Bitmap in .NET Framework implements new Bitmap(original, ...)
> constructorst as copying the original bitmap to a memory bitmap.
> Mono implements it using GdipCloneBitmapAreaI.
> I don't know the behaviour of Cairo but GdipCloneBitmapAreaI on GDI+ results
> in a bitmap based on the original.
> As GDI+ draws bitmaps from the stream if they were created from a stream
> this different implementation of the above contructors results in
> significant difference as the stream should be closed while the bitmap uses
> it, otherwise the bitmap cannot be rendered.
> BitmapFromImage is not needed for this constructor and is not recommended in
> MakeTransparent.
> And not that using Dispose (that calls GC.SuppressFinalize) in
> BitmapFromImage result in memory leak as the new image will never be
> disposed.
> Sincerely,
> Kornél

The patch is correct. Thanks a lot for your fixes. They are already
commited in SVN.



Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas

More information about the Mono-devel-list mailing list