Home › Forums › TWAIN Classic › Memory transfer mode: desuming the header › Reply To: Memory transfer mode: desuming the header
August 12, 2009 at 3:22 pm #24992
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.
–