Bmp loading help

Hey guys, I need some help. I need a function that loads a bmp and stores ONLY it's red values in a 64x64 array. Here's what I want it to look like.

1
2
3
4
5
6
7
8
unsigned char array[64][64];//I used an unsigned char so that it stores numbers from 0-255

void loadbmp(char *FP)//FP stands for filepath
{
    FILE *bmp = fopen(FP, "r+b");
    //This is the part that I need help on
    //I don't know how to get the red values from the bmp
}


So does anyone know how to do this? Just remember, the bmp will ALWAYS be 64x64 pixels in size.

Anyways, thanks in advance! =D

SuperSonic
Last edited on
Thank you for the links, but I'm not sure how to port that to my code. Could you help? =)
Never mind, I figured it out ^^
Topic archived. No new replies allowed.