hi, i want to save bitmap data from stream.
how can i do it?
can i get some code?
thx
Printable View
hi, i want to save bitmap data from stream.
how can i do it?
can i get some code?
thx
What sort of bitmap, from what sort of stream? What bitmap format do you want to save it as? What platform?
--
Mats
I assume you mean save the bitmap to a file.
You'll need the following Namespaces:
And then maybe this will help:Code:using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
Code:public static void BitmapToFile(Bitmap image, String filename)
{
MemoryStream stream = new MemoryStream();
image.Save(stream, ImageFormat.Bmp);
File.WriteAllBytes(filename, stream.ToArray());
stream.Close();
}
i just got it.
dont worry.
thank u, theoobe