Page 1 of 1

BMP loading code, corruption?

PostPosted: Tue Feb 19, 2008 1:45 am
by Game A Gogo
I have a problem, I made a code to load bitmaps. It worked PERFECTLY! no bugs or anything, then I try it again, after writing a code 370 lines long. The file seems corrupted... Like if "fgetc(import);" suddenly stopped advancing in the FILE correctly...

PLEASE!!! HELP ME!!!

The loading code is in the actor Text=>Create Actor=>Script Editor.

to the person who helps me, he gets two scores. but one for sure.

Re: BMP loading code, corruption?

PostPosted: Tue Feb 19, 2008 2:53 am
by Fuzzy
I cannot quite spot it, but it looks like your reading of the rgb is off. Double check where you start reading rgb from. The image is only 2 colors, but when I run the example I see yellow. That tells me that its using the wrong values for RGB.

Re: BMP loading code, corruption?

PostPosted: Tue Feb 19, 2008 3:03 am
by Game A Gogo
I will try to see if anything can work, I still wonder why it used to work before and bam, now it doesn't I haven't edited the code at all.

Re: BMP loading code, corruption?

PostPosted: Tue Feb 19, 2008 3:06 am
by Fuzzy
Game A Gogo wrote:I will try to see if anything can work, I still wonder why it used to work before and bam, now it doesn't I haven't edited the code at all.


I'm in various chats if you want to catch me to talk it over. I've had strangeness like that happen. I have some ideas for simplifying your code too.

From what I am reading the bmp format changes from windows version to windows version. If you edited it with a different program, even if you didnt change the bit depth and compression, it may be different.