The MASM Forum Archive 2004 to 2012

General Forums => The Workshop => Topic started by: AeroASM on March 15, 2005, 08:07:37 AM

Title: How to make a BMP?
Post by: AeroASM on March 15, 2005, 08:07:37 AM
I need to export previously rendered DIBs into bmp files. I have found out that you need to write a 14 byte mini-header, then a 40 byte BITMAPINFOHEADER, then the array of pixels. My question is: what goes in the mini-header?
Title: Re: How to make a BMP?
Post by: Tedd on March 15, 2005, 01:10:55 PM
42,4D,<DWORD-filesize>,<DWORD-Reserved>,<DWORD-offset_to_imgData>



**
42,4D = "BM"
DWORD-filesize = header.length + palData.length + imgData.length
DWORD-Reserved = 0
<DWORD-offset_to_imgData> = header.length + palData.length
Title: Re: How to make a BMP?
Post by: AeroASM on March 15, 2005, 01:57:20 PM
Thanks, that solved all my problems.