-1
我写为显示Y1(亮度)这个代码在图片框显示:图像不是在图片框
R = new byte [width, height];// R,G,B not empty contain data
G = new byte [width, height];
B = new byte [width, height];
Y1 = new double[width, height];
Bitmap bmp4 = new Bitmap(width, height);
Int32 zz;
for (int x = 0; x < width; x++)
for (int y = 0; y < height; y++)
{
Y1[x, y] = (0.39 * R[x,y]) + (0.59 * G[x,y]) + (0.12 * B[x,y]);
zz = Convert.ToInt32(Y1[x, y]);
bmp4.SetPixel(x, y, Color.FromArgb(zz ));
}
当我执行此代码图片框空不显示图像,为什么? 这个代码在C#和图像的类型是位图
重复的[this](http://stackoverflow.com/questions/20974290/display-double-array-in-picturebox?rq=1)和[this](http://stackoverflow.com/questions/ 20978085/convert-each-location-from-array-of-double-rq = 1)并且可能[this](http://stackoverflow.com/questions/20974290/display-double-array-in- picturebox?rq = 1) – venerik
@ venerik-虽然它的复制,但在那些问题没有答案..所以这个问题是正确的... ... –