public Bitmap GetDataPicture(int w, int h, byte[] data) { Bitmap pic = new Bitmap(this.width, this.height, System.Drawing.Imaging.PixelFormat.Format32bppArgb); Color c; for (int i = 0; i < data.length; i++) { c = Color.FromArgb(data[i]); pic.SetPixel(i%w, i/w, c); } return pic; }
{ Bitmap pic = new Bitmap(this.width, this.height, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
Color c; for (int i = 0; i < data.length; i++)
{
c = Color.FromArgb(data[i]);
pic.SetPixel(i%w, i/w, c);
} return pic;
}