Check your memory usage in Task Manager when the application crashes - it is probably rather large.
Clean up the bitmaps each time - otherwise they are leaking something fierce.
Bitmap previousImage = null;
for(r... g... b...)
{
// ...
Invoke((MethodInvoker) delegate
{
var previousImage = pictureBox1.Image;
pictureBox1.Image = image;
if (previousImage != null)
previousImage.Dispose();
});
}