I write This code for display Y1 in pictureBox but when I run program the picture box is empty not display picture,what is error or what method to display image in picture box in c# ??
byte []R = new byte[width, height];//R,G,B arrays not empty it contain data
byte []G = new byte[width, height];
byte []B = new byte[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));
}
pictureBox6.Image=bmp4;