I need help for a sample code to convert a bitmap to byte as well from byte
to bitmap..
I doubt you'll be able to squeeze an entire bitmap into a single byte
- did you mean a byte array?
There are many ways to do that, depending on the format you want it
in. The easiest way is probably to save the bitmap to a stream and
then read it's content. Something like
MemoryStream ms = new MemoryStream();
yourBitmap.Save( ms, ImageFormat.Bmp );
byte[] bitmapData = ms.ToArray();
Mattias
--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/
Please reply only to the newsgroup.