Bonjour, je souhaite convertir un bitmpa en binaire et pour cela je passe par un memory stream. Malheureusement, je n'arrive pas a enregistrer mon Bitmap dans le stream :
Je recois une {"NotSupportedException"} et la stack trace:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5 MemoryStream ms = new MemoryStream(); bPOIPicture.Save(ms, System.Drawing.Imaging.ImageFormat.Gif);//Porb ici //Create a byte [] from the picture byte[]myByteArray = ms.ToArray();
"at Microsoft.AGL.Common.MISC.HandleAr()\r\nat System.Drawing.Image.Save()\r\nat DeviceApplication4.Form1.loadImage()\r\nat DeviceApplication4.Form1..ctor()\r\nat DeviceApplication4.Program.Main()\r\n"
Partager