Set the pixels of image to the values stored in an array of integers
问题 namespace txtToImg { public partial class Form1 : Form { public Form1() { InitializeComponent(); string fileContent = File.ReadAllText("D:\\pixels.txt"); string[] integerStrings = fileContent.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); int[] integers = new int[integerStrings.Length]; for (int n = 0; n < integerStrings.Length; n++) { integers[n] = int.Parse(integerStrings[n]); } Bitmap my = new Bitmap(512, 512); for (int i = 0; i < 512; i++) for (int j = 0; j < 512; j++)