to 想请教哪位大侠知道,如何把这组数据转换成位图流传输的形式,直接在画图容器上显示呢??通过楼上的方法,先转化成bitmap,至于传输,需要通过MemoryStream转化成byte[],大致如下 MemoryStream ms = new MemoryStream( ); yourBitmap.Save( ms, ImageFormat.Bmp ); ms.Flush(); byte[] bData = ms.GetBuffer(); ms.Close(); //Send data using "bData"接收后,转换成MemoryStream,以及转换成Bitmap,可以如下: MemoryStream ms = new MemoryStream( bData ); Bitmap bit = new Bitmap( ms );
MemoryStream ms = new MemoryStream( );
yourBitmap.Save( ms, ImageFormat.Bmp );
ms.Flush();
byte[] bData = ms.GetBuffer();
ms.Close();
//Send data using "bData"接收后,转换成MemoryStream,以及转换成Bitmap,可以如下:
MemoryStream ms = new MemoryStream( bData );
Bitmap bit = new Bitmap( ms );