-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-雖然它的複製,但在那些問題沒有答案..所以這個問題是正確的... ... –