Original Post
I am having some problems with a little project of mine. I really haven''t learned C file I/O functions the way I should have I assume. Anyways ... I can load the BITMAPFILEHEADER and BITMAPINFOHEADER just fine. Since it is a 24-bit bmp, I assume that means that there is no pallete. So I go directly onto trying to load the pixel data ... but I have no clue how to.
I had planned to store the pixel data in - BYTE* pData;
Whenever I find the biWidth and biHeight, I do -
pData = new BYTE[ 3 * biWidth * biHeight].
Then:
temp = 3 * biWidth * biHeight;
for( int i = 0; i < temp; i++)
fread( &pData, sizeof( BYTE ), 1, in );
for some reason I am having problems ... cuz I impelented a test. I tried to output all the data basically the same way i got it, cept i used fwrite( .. );
When I try to open the file, it says not a current bmp file formay. After tinkering for 20 minutes, I have only managed to make a 593 mb file, the original is like 50k
-------------------
The Reindeer Effect
