long i=0;
while (!feof(file))
{
i++;
printf("%c",fgetc(file));
}
printf("\n%ld Bytes.",i-(i!=0));
and in windows explorer it says 6.10kb.
also, i cant find the header (the file begin with PSG) in notepad. but i do find it in my program.
in the file i've used hex, chars, compressions, bgcolor, and a header of course.
the weird is, when i test it with a small program that contains background and many pixels only- it works well in both notepad and my program (compiler: TC3, windows: XPro).
what is going on? (tell me if a source code is needed, the code is just fine. i used longs and no ints).
thanks,
pex.
wrong bytes?
Hi. im having a problem.
i dont know if my image file (my own format) is 64 bytes or 6.10kb.
in my program it says 64 bytes (and print the file):
I doubt it could account for such a large discrepancy but are sure that the file is opened in binary mode?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement