I am using the following code:
f = fopen( _stringhelper.STR(\"%s.bmp\", filename), \"wb\" );
if( !f ) {
_core.Error( ERC_ASSET, \"ncImageLoader::CreateIm
Bitmaps are stored "upside-down", see more about that here:
Why are bmps stored upside down?
You could set the height as a negative value to have it displayed correctly. (-height)
From MSDN site, BITMAPINFOHEADER:
If biHeight is negative, the bitmap is a top-down DIB with the origin at the upper left corner.