It appears that on Windows at least, BMP files are loaded upside down...
Hmm... I am using the latest version and this is not happening for me.
They work fine for me.
BMP can both be written from bottom to top or from top to bottom, mabe you have some pictures where this isn't set correct? Or mabe GLBasic is interpreting them wrong. Can you upload the image you have problems with?
I've included the zipped BMP file.
Also here is the result of using it...
It loads correctly in Paint...
[attachment deleted by admin]
It does load correctly in MSPaint, but not in GLB as mentioned. However, when changed to a .PNG then returned to a .BMP it displays correctly. It seems to be a problem with the .BMP not GLB.
My guess is that whatever you saved this image from is doing something non-standard/unusual to the image. MSPaint handles non-standard, as it doesn't exactly stick with standard itself (32 bit .PNG - I'm looking at you!).
What did you use to create the image with?
I suspect they were created by BlitzMax - when loading in Mappy data. The file is over 4 years old now :)
Funny you mention BlitzMax, as I created a utility with BMax a long while back and it displayed a normal image upside down for no obvious reason.
BMP images are normally written upside down, you have to correct for that while loading. The height is a signed int :-)
That image has a biSizeImage value of 768, which is not typical for BI_RGB images.
The pixels are indeed upside down in the image bits. Very odd.
I can't find any other difference that indicates that the image is not stored upside down. :(
Can you ask the author of who wrote the bitmap?
Unfortunately I cant there - it was programmatically created...
Ah well - cant blame GLBasic this time :)
If I remember right: when the height of a BMP is positive, the image lines are stored upside down.
If the height is negative, the image lines are stored the right way...
Mabe it was MS that created this format? :-)
the height of the image is positive, there's no difference. A real shame that I don't know what's different in this image and why the pixels are stored upside down. There must be some way to tell that, because MSPaint can read it properly.
I checked the BMP and the width is 0x1000 0000, the height is 0xF0FF FFFF
I would say the image is stored with negative height which means the line order is inverted to normal BMP.
That was it!!
I fixed it in the next update!
Yey!