- Topics - 3
- Replies - 66
- Total Posts - 69
Windows BMP images have the origin (point 0,0) at the bottom-left corner of the image. Most everything else has it at the top-left.
A quick and easy solution is to write a negative length in the header. For example, if the image is 100 pixels long, set the length to -100. Most programs can handle that. Some interpret the length as an unsigned integer so a negative value looks like a very large positive value. Usually, these programs will report that there’s not enough memory to load the image.
The other solution is to flip the pixels vertically so the origin is at the bottom-left.