OV7670 buffer image to file

Hi everybody,

I am working with a Mega board, and the OV7670 camera.
I am using the 320 * 240 option and I got the buffer with 76800 values. All are integer numbers.

How can I convert that into an image?

This is a sample of the first numbers of the buffer:
1,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,1,1,1,1,65,1,1,8,8,8,8,8,8,8,8,8,65,65,65,72,8,65,65,65,65,65,65,73,73,73,65,65,65,65,1,1,65,65,72,72,65,65,65,65,65,65,65,65,65,65,65,65,65,72,8,65,1,1,1,1,1,1,1,1,1,0,1,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,1,0,8,0,8,0,65,0,1,0,8,0,8,0,65,64,8,0,65,64,65,64,8,64,65,64,65,64,65,64,65,64,73,64,65,64,1,0,65,64,65,64,8,64,72,64,65,64,65,64,65,64,65,64,65,0,8,64,1,0,1,0,1,0,1,0,1,1,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,1,8,8,8,8,8,8,8,8,8,8,8,8,8,8,65,65,72,72,65,65,65,65,65,65,65,65,65,65,65,65,73,73,65,65,65,65,65,65,65,65,65,72,72,65,65,65,65,65,65,65,1,65,65,8,8,8,1,1,1,1,1,1,1,1,
73,64,73,64,65,0,1,0,1,0,1,0,1

It's better to convert this array in a binary file, just write every byte as... byte!
Search for a program that can read raw images, maybe Paint.NET
Your raw image will be 320x240 8bit

You will get a greyscale image. Then you have to debayerize you image using program like rawtherapee, maybe this is able also to read the binary array.