I must save a bitmap file, and then access the rgb of each pixel and save the decimal code of each color of pixel (meaning red, green and blue) in a separate matrix (array).
For hidding textfile in bmp lmage l need to save each rgb code in seperate matrix...lm looking for effiecient way,this is my code
This code will be run,but l cant show the result of each matrix in text of lable.how can I see the output of each matrix?
Bitmap bmp1 = new Bitmap(@"D:a.jpg");
pictureBox1.Image = bmp1;
Color col = new Color();
int w = Int32.Parse(bmp1.Width.ToString());
int h = Int32.Parse(bmp1.Height.ToString());
int[,] redstr = new int[w,h];
int[,] greenstr = new int[w, h];
int[,] bluestr = new int[w, h];
int red = 0, green = 0, blue = 0;
for (int i = 0; i < w; i++)
{
for (int j = 0; j < h; j++)
{
col = bmp1.GetPixel(i, j);
red = col.R;
green = col.G;
blue = col.B;
redstr[i, j] = red;
greenstr[i, j] = green;
bluestr[i, j] = blue;
}
}