Bitmap biHeight Negative or Positive?
As I observed, most bitmaps are bottom-up DIB and the biHeight
of BITMAPINFOHEADER are positive. After scanned a bitmap,
I have to save the RGB data in a top-down way because of time issue.
So I set the biHeight negative. If I double-click the bmp file
directly, it can be shown correctly, but can't load it with ::LoadImage();
If I change biHeight to positive, I can load it with ::LoadImage(),
but the bitmap is upside-down.
Any help be appreciated.
Re: Bitmap biHeight Negative or Positive?
Hi All,
I'm wondering if any more light has been shed on this issue (I realize it is a very old post)? I started running into it recently pretty consistently on XP and even occasionally on Vista with very small bitmaps.
Just the normal LoadImage code:
Code:
hBitmap = (HBITMAP)LoadImage(NULL, szFileName, IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION | LR_LOADFROMFILE);
Any insight would be helpful. Thanks!