Awright, yo...
I'm having a bit of a problem. I've been experimenting with the B+ Demo lately, and I'm trying to create a program that can open any file, and display its contents in a text field. So for instance, a text file would display the same way it would in Notepad, but a sound file would be a load of "random" letters & symbols, as each byte was translated into a character.
My problem is this: every time I open a normal file, like a DOC, or a TXT, or even an HTM, it works fine; the contents display in the field. But when I try to load a bitmap image, all that shows up is "BM" followed by some kind of symbol, regardless of its size. I know that file size isn't the problem, because I've successfully opened text documents larger than the images I've tried.
A thought did cross my mind, however: any bitmap image is bound to contain at least one byte set to zero. Could this be making the text field "cut off" the contents prematurely? If so, any combat ideas?
I'm having a bit of a problem. I've been experimenting with the B+ Demo lately, and I'm trying to create a program that can open any file, and display its contents in a text field. So for instance, a text file would display the same way it would in Notepad, but a sound file would be a load of "random" letters & symbols, as each byte was translated into a character.
My problem is this: every time I open a normal file, like a DOC, or a TXT, or even an HTM, it works fine; the contents display in the field. But when I try to load a bitmap image, all that shows up is "BM" followed by some kind of symbol, regardless of its size. I know that file size isn't the problem, because I've successfully opened text documents larger than the images I've tried.
A thought did cross my mind, however: any bitmap image is bound to contain at least one byte set to zero. Could this be making the text field "cut off" the contents prematurely? If so, any combat ideas?