biWidth = 930
biHeight = 768
biBitCount = 8
biCompression = 0
biSizeImage = 715776 <---- HUH?
Now, I'll be the first to admit that I suck at math but it seems to me
the size should be 930 X 768 = 714240. If I add two to the width I get
932 X 768 = 715776.
In fact.. if I run the image data through StretchDiBits with a source
width and height of 930 X 768 I get a few diagonal lines and a skewed
image. If I do the same thing after setting the width to 932 I get two
pixels on the right side of each line set to black. My analysis
routine must be able to deal with any resolution image. Are there
certain resolutions that imaging software compensates for? What are
these weird resolutions? Does anyone have any experience with this
issue?
I recall seeing somewhere in MSDN that byte-count of single row in
a bitmap must be padded to DWORD boundary. DWORD is 4 bytes and since
your bit-count is 8 (1 byte), to have the bitmap correct, real width
must contain two padding bytes (to 932 which can be divided by 4).
But I am not completely sure about this so google first to either confirm
or dismiss my thoughts.
--
Jan Ringoš, Tri...@MX-3.cz
http://Tringi.MX-3.cz
http://www.ringos.cz