Hi all,

I want to do the following - any help would be appreciated.

I've got a 8*8 grid with different coloured tokens 8 possible (it's a game) now given the current state of the game i want to be able to solve it with the least moves possible - this part i've done...

however i want to be able to take a screenshot of the game in progress and save the gameboard as a bmp file.

Now here's where i need help - using c - i need to read the file and convert the 240*240 pixel game board to an 8*8 array so the rest of my program can do its work.

-1st read the bmp - no idea whats involved,
-2nd read the color info at 64 distinct and evenly space co-ordinates both horizontally/vertically
(sure i could do this if i knew how to read the bmp)
-3rd compare the value to an array of preset color values in order to assign a name to the piece at each location of the 8*8 array
(again pretty sure i could manage this)

Any help or references to code/tutorials would be great

Thanks.