Problems when loading a bitmap
I'm trying to load up bitmaps just by reading bytes and the such (not using the windows functions to do so, just like fread and stuff). However, whenever I get to a color with an element that is 26, fread interprets that as an eof and refuses to read futher.
So... does anyone know how to get around this problem? I need to actually load the 26 up, and keep on going until the true eof. Any help would be much appreciated.
Use fopen with "rb" instead of "rt" or "r". This way 26s are not interpreted as EOF.
Clarification: The b tells the OS to open the file in binary mode. Streams have similar conventions.
Clarification: The b tells the OS to open the file in binary mode. Streams have similar conventions.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement