[Mono-bugs] [Bug 80786][Wis] Changed - [WIN] Saving Image to MemoryStream fails

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sun Feb 11 00:27:24 EST 2007

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by miguel at ximian.com.


--- shadow/80786	2007-02-10 19:12:50.000000000 -0500
+++ shadow/80786.tmp.6926	2007-02-11 00:27:24.000000000 -0500
@@ -149,6 +149,49 @@
 Please feel free to modify the declaration of GdipSaveImageToStream.
 (Note that this doesn't fix HandleRef but avoids using it 
+------- Additional Comments From miguel at ximian.com  2007-02-11 00:27 -------
+HandleRef was not supported in Mono in the first place (until a few
+minutes ago, ie, nothing before Mono 1.2.4)
+Any code using HandleRef in System.Drawing was never tested, you would
+get garbage.
+Currently with SVN/trunk and HandleRef support, am getting this crash,
+which seems to be something else:
+mono$ mono --debug /tmp/fi.exe
+  at (wrapper managed-to-native)
+System.Runtime.InteropServices.Marshal.PtrToStringUni (intptr) <0x00004>
+  at (wrapper managed-to-native)
+System.Runtime.InteropServices.Marshal.PtrToStringUni (intptr)
+  at System.Drawing.GdipImageCodecInfo.MarshalTo
+[0x00012] in
+  at System.Drawing.Imaging.ImageCodecInfo.GetImageEncoders ()
+[0x00082] in
+  at System.Drawing.Image.findEncoderForFormat
+(System.Drawing.Imaging.ImageFormat) [0x00000] in
+  at System.Drawing.Image.Save
+(System.IO.Stream,System.Drawing.Imaging.ImageFormat) [0x00000] in
+  at (wrapper remoting-invoke-with-check) System.Drawing.Image.Save
+(System.IO.Stream,System.Drawing.Imaging.ImageFormat) <0xffffffff>
+  at ImageSerialize.MainClass.ImageToString (System.Drawing.Image)
+  at ImageSerialize.MainClass.Main (string[]) <0x0001b>
+  at (wrapper runtime-invoke)
+(object,intptr,intptr,intptr) <0xffffffff>

More information about the mono-bugs mailing list