I currently am in the process of teaching to myself the structure of a Bitmap. So i started with the absolute basics. Heres my code.
`Load BMP to be analysed
Load Bitmap "Media/Heightmaps/Map1.bmp", 1
Set Current Bitmap 0
`Make MBlock from BMP
Make memblock from Bitmap 1, 1
`Get BMP Width / Height / Bit Per Pix
Width = Memblock Dword (1, 0)
Height = Memblock Dword (1, 4)
BPPix = Memblock Dword (1, 8)
GMZ = Get Memblock Size (1)
DAT = Memblock Dword (1, 12)
`Print Data
Print "Done - ", GMZ, " Bytes"
Print "BMP Width ", Width, " Height ", Height
Print "There are ", BPPix, " Bits Per Pixel"
Print "The Details of Point 12 is ", DAT
Wait Key
End
The first 12 Bytes (0 - 11) Contain the BMP data, when i retrieve the data for position 12 i recieve the following Info.
"There are 32 Bits Per Pixel"
"The Deails of Point 12 is 9737364"
I understand this number is the combination of the next 4 Bytes (12 - 15) but i dont understand how that is translated from the Colour the first Pixel. Could someone shed some light on this for me?