Problems when loading a bitmap

Started by
1 comment, last by Blackstream 19 years, 2 months ago
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.
-Blackstream Will you, won't you, will you, won't you, won't you take my virus?-The Mad HackerBlackstream's Webpage
Advertisement
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.

Fruny: Ftagn! Ia! Ia! std::time_put_byname! Mglui naflftagn std::codecvt eY'ha-nthlei!,char,mbstate_t>

Thanks! :D It's working now... I can't believe that one little letter was responsible for all my trouble -_-;
-Blackstream Will you, won't you, will you, won't you, won't you take my virus?-The Mad HackerBlackstream's Webpage

This topic is closed to new replies.

Advertisement