Hi,
Well I expect you have messed up a little in your coding. The code you have does successfully load all you Image into an array. I expect your error is coming from not saving the changed image back into this array. I've added three button two your code so I could effectively check your code. Two I know you already have which cycle through your images[n] array.
private void nextBtn_Click(object sender, EventArgs e)
{
if (images.Length - 1 > imageCount)
{
imageCount++;
pictureBox1.Image = images[imageCount];
}
this.Refresh();
}
private void PrevBtn_Click(object sender, EventArgs e)
{
if (imageCount > 0)
{
imageCount--;
pictureBox1.Image = images[imageCount];
}
this.Refresh();
}
Now I added a third in this case all I did was change the image effect into a grayscale one. Here you would have your code to adjust brightness etc.
private void Grey_BTN_Click(object sender, EventArgs e)
{
Bitmap myImage = (Bitmap)pictureBox1.Image;
for (int y = 0; y < myImage.Height; y++)
{
for (int x = 0; x < myImage.Width; x++)
{
Color c = myImage.GetPixel(x, y);
int luma = (int)(c.R * 0.3 + c.G * 0.59 + c.B * 0.11);
myImage.SetPixel(x, y, Color.FromArgb(luma, luma, luma));
}
}
images[imageCount] = myImage;
pictureBox1.Image = images[imageCount];
this.refresh();
}
I hope this helps
Let me know if you need more assistant, and if you need mor advanced image processing features then I suggest EMGU a C# wrapper for the OpenCV image processing library.
Take Care
Chris