我需要将输出输出到图片框和文本文件。但出现错误,因为无法将类型'char'隐式转换为system.drawing.image。
var color = bmp.GetPixel(x, y);
var brightness = Brightness(color);
var idx = brightness / 255 * (pixels.Length - 1);
var pxl = pixels[pixels.Length - (int)Math.Round(idx) - 1];
pictureBox2.Image = pxl; //error