有一个二维数组float[,] data,想用里面的数据画一个png图片,谁能给我个例子啊?高分求,如果分不够可以加

解决方案 »

  1.   

    Graphics _Graphics  =Graphics.FormImage(_PngImage);_Graphics.DrawImage(???,0,0);使用Graphics就可以
      

  2.   

    要画的点都是三维坐标点,flota[x,y]=z
    我画的时候怎么定位点啊?怎么设置分辨率?
    能不能详细点?
      

  3.   


    Color c = new Color();
    Bitmap box = new Bitmap(x,y);
    int rr=0;
    for(int i=0;i<x;i++)
    {
       for(int j=0;j<y;j++)
       {
          rr = (int)float[i,j];
          c= Color.FromArgb(rr,rr,rr)
          box.setPixel(i,j,c);
       }
    }
    pictureBox1.Refresh();
    PictureBox1.Image = box;
      

  4.   

    Bitmap b=new Bitmap(data.GetLength(0),data.GetLength(1));
    for(int i=0;i<b.Width;i++)
    {
    for(int j=0;j<b.Height;j++)
    {
    //假设你的data数组里的float数都是在颜色允许的范围内的。
    b.SetPixel(i,j,Color.FromArgb((int)data[i,j]));
    }
    }