First sorry for the english. I'm having an strange problem when I'm trying to save a bitmap ("Generic GDI+ error") from a picturebox in my win app, I know that this problem occurs when trying to save to a directory that has no permission, but in this case I'm trying to save it to a memoryStream.
using (MemoryStream fotoStream = new MemoryStream())
{
Bitmap imagen = picture1.Image as Bitmap;
imagen.Save(fotoStream, imagen.RawFormat); //Error here
byte[] array = fotoStream.ToArray();
fotoStream.Close();
}
Any light on this?