I'm trying to do some processing in .bmp files and I need to use C, I've used it quite a bit except for image processing...an d I'm trying to read the header block and pretty much from there just travel through the pixels and compare it with other file.
I haven't really worked on images before...so any pointers would be appreciated
this is what I'm trying to do to open the file..but I don't seem to be able to parse through the Header....any ideas, or other paths that I can take ?
FILE *fp;
fp = fopen("kitty.bm p","r");
unsigned char Header[0x435], image[256][256];
fread(Header,1, 0x435,fp); // copy image header to Header array
fseek(fp,0x436, SEEK_SET); // Move file pointer to start of image data
fread(image,1,2 56*256,fp); // read image data and copy to ImageIn1[][] array
thanks in advance
I haven't really worked on images before...so any pointers would be appreciated
this is what I'm trying to do to open the file..but I don't seem to be able to parse through the Header....any ideas, or other paths that I can take ?
FILE *fp;
fp = fopen("kitty.bm p","r");
unsigned char Header[0x435], image[256][256];
fread(Header,1, 0x435,fp); // copy image header to Header array
fseek(fp,0x436, SEEK_SET); // Move file pointer to start of image data
fread(image,1,2 56*256,fp); // read image data and copy to ImageIn1[][] array
thanks in advance
Comment