Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
BMP file format
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Example 2 === Following is an example of a 4Γ2 pixel, 32-bit bitmap with opacity values in the alpha channel (Windows DIB Header {{mono|BITMAPV4HEADER}}) with pixel format ARGB32. {| class="wikitable" ! Offset (hex) ! Size (bytes) ! Hex value ! Value ! Description |- | colspan="5" style="text-align: center;" | BMP Header |- | align="center" |00 | align="center" |2 | style="padding: 0px 20px; white-space: nowrap; font-family:monospace;"|42 4D | style="padding: 0px 10px"|"BM" | style="padding: 0px 10px"|ID field (42h, 4Dh) |- | align="center" |02 | align="center" |4 | style="padding: 0px 20px; white-space: nowrap; font-family:monospace;"|9A 00 00 00 | style="padding: 0px 10px"|154 bytes (122+32) | style="padding: 0px 10px"|Size of the BMP file |- | align="center" |06 | align="center" |2 | style="padding: 0px 20px; white-space: nowrap; font-family:monospace;"|00 00 | style="padding: 0px 10px"|Unused | style="padding: 0px 10px"|Application specific |- | align="center" |08 | align="center" |2 | style="padding: 0px 20px; white-space: nowrap; font-family:monospace;"|00 00 | style="padding: 0px 10px"|Unused | style="padding: 0px 10px"|Application specific |- | align="center" |0A | align="center" |4 | style="padding: 0px 20px; white-space: nowrap; font-family:monospace;"|7A 00 00 00 | style="padding: 0px 10px"|122 bytes (14+108) | style="padding: 0px 10px"|Offset where the pixel array (bitmap data) can be found |- | colspan="5" style="text-align: center;" | DIB Header |- | align="center" |0E | align="center" |4 | style="padding: 0px 20px; white-space: nowrap; font-family:monospace;"|6C 00 00 00 | style="padding: 0px 10px"|108 bytes | style="padding: 0px 10px"|Number of bytes in the DIB header (from this point) |- | align="center" |12 | align="center" |4 | style="padding: 0px 20px; white-space: nowrap; font-family:monospace;"|04 00 00 00 | style="padding: 0px 10px"|4 pixels (left to right order) | style="padding: 0px 10px"|Width of the bitmap in pixels |- | align="center" |16 | align="center" |4 | style="padding: 0px 20px; white-space: nowrap; font-family:monospace;"|02 00 00 00 | style="padding: 0px 10px"|2 pixels (bottom to top order) | style="padding: 0px 10px"|Height of the bitmap in pixels |- | align="center" |1A | align="center" |2 | style="padding: 0px 20px; white-space: nowrap; font-family:monospace;"|01 00 | style="padding: 0px 10px"|1 plane | style="padding: 0px 10px"|Number of color planes being used |- | align="center" |1C | align="center" |2 | style="padding: 0px 20px; white-space: nowrap; font-family:monospace;"|20 00 | style="padding: 0px 10px"|32 bits | style="padding: 0px 10px"|Number of bits per pixel |- | align="center" |1E | align="center" |4 | style="padding: 0px 20px; white-space: nowrap; font-family:monospace;"|03 00 00 00 | style="padding: 0px 10px"|3 | style="padding: 0px 10px"|BI_BITFIELDS, no pixel array compression used |- | align="center" |22 | align="center" |4 | style="padding: 0px 20px; white-space: nowrap; font-family:monospace;"|20 00 00 00 | style="padding: 0px 10px"|32 bytes | style="padding: 0px 10px"|Size of the raw bitmap data (including padding) |- | align="center" |26 | align="center" |4 | style="padding: 0px 20px; white-space: nowrap; font-family:monospace;"|13 0B 00 00 | style="padding: 0px 10px"|2835 pixels/metre horizontal | style="padding: 0px 10px" rowspan="2"|Print resolution of the image,<br /> [[Dots per inch|72 DPI]] Γ 39.3701 inches per metre yields 2834.6472 |- | align="center" |2A | align="center" |4 | style="padding: 0px 20px; white-space: nowrap; font-family:monospace;"|13 0B 00 00 | style="padding: 0px 10px"|2835 pixels/metre vertical |- | align="center" |2E | align="center" |4 | style="padding: 0px 20px; white-space: nowrap; font-family:monospace;"|00 00 00 00 | style="padding: 0px 10px"|0 colors | style="padding: 0px 10px"|Number of colors in the palette |- | align="center" |32 | align="center" |4 | style="padding: 0px 20px; white-space: nowrap; font-family:monospace;"|00 00 00 00 | style="padding: 0px 10px"|0 important colors | style="padding: 0px 10px"|0 means all colors are important |- | align="center" |36 | align="center" |4 | style="padding: 0px 20px; white-space: nowrap; font-family:monospace;"|00 00 FF 00 | style="padding: 0px 10px"|00FF0000 in big-endian | style="padding: 0px 10px"|Red channel bit mask (valid because BI_BITFIELDS is specified) |- | align="center" |3A | align="center" |4 | style="padding: 0px 20px; white-space: nowrap; font-family:monospace;"|00 FF 00 00 | style="padding: 0px 10px"|0000FF00 in big-endian | style="padding: 0px 10px"|Green channel bit mask (valid because BI_BITFIELDS is specified) |- | align="center" |3E | align="center" |4 | style="padding: 0px 20px; white-space: nowrap; font-family:monospace;"|FF 00 00 00 | style="padding: 0px 10px"|000000FF in big-endian | style="padding: 0px 10px"|Blue channel bit mask (valid because BI_BITFIELDS is specified) |- | align="center" |42 | align="center" |4 | style="padding: 0px 20px; white-space: nowrap; font-family:monospace;"|00 00 00 FF | style="padding: 0px 10px"|FF000000 in big-endian | style="padding: 0px 10px"|Alpha channel bit mask |- | align="center" |46 | align="center" |4 | style="padding: 0px 20px; white-space: nowrap; font-family:monospace;"|20 6E 69 57 | style="padding: 0px 10px"|little-endian "<code>Win </code>" | style="padding: 0px 10px"|LCS_WINDOWS_COLOR_SPACE |- | align="center" |4A | align="center" |36 | style="padding: 0px 20px; white-space: nowrap; font-family:monospace;"|00...00 | style="padding: 0px 10px"|CIEXYZTRIPLE Color Space endpoints | style="padding: 0px 10px"|Unused for LCS "<code>Win </code>" or "<code>sRGB</code>" |- | align="center" |6E | align="center" |4 | style="padding: 0px 20px; white-space: nowrap; font-family:monospace;"|00 00 00 00 | style="padding: 0px 10px"|0 Red Gamma | style="padding: 0px 10px"|Unused for LCS "<code>Win </code>" or "<code>sRGB</code>" |- | align="center" |72 | align="center" |4 | style="padding: 0px 20px; white-space: nowrap; font-family:monospace;"|00 00 00 00 | style="padding: 0px 10px"|0 Green Gamma | style="padding: 0px 10px"|Unused for LCS "<code>Win </code>" or "<code>sRGB</code>" |- | align="center" |76 | align="center" |4 | style="padding: 0px 20px; white-space: nowrap; font-family:monospace;"|00 00 00 00 | style="padding: 0px 10px"|0 Blue Gamma | style="padding: 0px 10px"|Unused for LCS "<code>Win </code>" or "<code>sRGB</code>" |- | colspan="5" align="center"|Start of the Pixel Array (the bitmap Data) |- | align="center" |7A | align="center" |4 | style="padding: 0px 20px; white-space: nowrap; font-family:monospace;"|FF 00 00 7F | style="padding: 0px 10px"|255 0 0 127 | style="padding: 0px 10px"|Blue (Alpha: 127), Pixel (x=0, y=1) |- | align="center" |7E | align="center" |4 | style="padding: 0px 20px; white-space: nowrap; font-family:monospace;"|00 FF 00 7F | style="padding: 0px 10px"|0 255 0 127 | style="padding: 0px 10px"|Green (Alpha: 127), Pixel (x=1, y=1) |- | align="center" |82 | align="center" |4 | style="padding: 0px 20px; white-space: nowrap; font-family:monospace;"|00 00 FF 7F | style="padding: 0px 10px"|0 0 255 127 | style="padding: 0px 10px"|Red (Alpha: 127), Pixel (x=2, y=1) |- | align="center" |86 | align="center" |4 | style="padding: 0px 20px; white-space: nowrap; font-family:monospace;"|FF FF FF 7F | style="padding: 0px 10px"|255 255 255 127 | style="padding: 0px 10px"|White (Alpha: 127), Pixel (x=3, y=1) |- | align="center" |8A | align="center" |4 | style="padding: 0px 20px; white-space: nowrap; font-family:monospace;"|FF 00 00 FF | style="padding: 0px 10px"|255 0 0 255 | style="padding: 0px 10px"|Blue (Alpha: 255), Pixel (x=0, y=0) |- | align="center" |8E | align="center" |4 | style="padding: 0px 20px; white-space: nowrap; font-family:monospace;"|00 FF 00 FF | style="padding: 0px 10px"|0 255 0 255 | style="padding: 0px 10px"|Green (Alpha: 255), Pixel (x=1, y=0) |- | align="center" |92 | align="center" |4 | style="padding: 0px 20px; white-space: nowrap; font-family:monospace;"|00 00 FF FF | style="padding: 0px 10px"|0 0 255 255 | style="padding: 0px 10px"|Red (Alpha: 255), Pixel (x=2, y=0) |- | align="center" |96 | align="center" |4 | style="padding: 0px 20px; white-space: nowrap; font-family:monospace;"|FF FF FF FF | style="padding: 0px 10px"|255 255 255 255 | style="padding: 0px 10px"|White (Alpha: 255), Pixel (x=3, y=0) |} Note that the bitmap data starts with the lower left hand corner of the image.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)