Graphics myGraphics = this.CreateGraphics();            Bitmap myBitmap = new Bitmap(60, 20);
            myGraphics = Graphics.FromImage(myBitmap);
            myGraphics.FillRectangle(new SolidBrush(Color.White), 0, 0, 60, 20);
            myGraphics.DrawString("3365.0", new Font("Arial", 12), new SolidBrush(Color.Black), new Point(0, 2));怎么样再将图形数据转换为二进制数据

解决方案 »

  1.   

    System.IO.MemoryStream mms = new System.IO.MemoryStream();
                myBitmap.Save(mms, System.Drawing.Imaging.ImageFormat.Bmp);
                var bt = new byte[mms.Length];
                mms.Position = 0;
                mms.Read(bt, 0, Convert.ToInt32(bt.Length));
      

  2.   

    System.IO.MemoryStream mms = new System.IO.MemoryStream();
    myBitmap.Save(mms, System.Drawing.Imaging.ImageFormat.Bmp);
    bytes[] rr=mms.ToArray();
      

  3.   

    为什么bt的显示为 System.Byte[]