In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
In this issue, Xiaobian will bring you about how to understand BMP image format. The article is rich in content and analyzes and narrates from a professional perspective. After reading this article, I hope you can gain something.
BMP
BMP is a Windows image format, its organization is relatively simple, a simple bmp file header structure (BITMAPFILEHEAER)+ a picture information structure (BITMAPINFOHEADER)+ a palette structure (optional). The rest is the stored R,G,B values for each pixel. BITMAPFILEHEADER
WORD bfType: indicates the file type, the value must be 0x424D, that is, the character 'BM', otherwise it is not a BMP image.
DWORD bfSize: Indicates the size of the entire image file in bytes.
If you need to add a list, continue to click Add from the left.
WORD bfReserved1: Reserved, must be set to 0
WORD bfReserved2: Reserved, must be set to 0
DWORD bfOffbits: Indicates the offset from the beginning of the file header to the actual pixel. Due to the variability of the palette, the position where the actual pixel starts may change. This value can be determined.
BITMAPINFOHEADER
DWORD biSize: Indicates the number of bytes occupied by this structure, usually 0x28, i.e. 40 bytes.
DWORD biWidth: Obviously, indicates the width of the image.
DWORD biHeight: Same as above, indicating the height of the picture.
WORD biPlanes: Indicates the number of planes of the target device, which is 1.
WORD biBitCount: indicates bits/pixels, that is, how many bits each pixel occupies, the general values are 1, 4, 8, 16, 24, 32.
DWORD biCompression: Indicates the compression type of the pixel. Generally, it is the uncompressed type, i.e. BI_RGB. There are also options such as BI_RLE4, BI_RLE8, BI_JPEG, BI_BITFIELDS, which will not be repeated here.
DWORD biSizeImage: Indicates the size of the image in bytes, which can be set to 0 if it is of type BI_RGB.
LONG biXPelsPerMeter: horizontal resolution in pixels per meter.
LONG biYPelsPerMeter: Vertical resolution in pixels per meter.
DWORD biClrUsed: Indicates the number of index colors in the color table actually used by the bitmap (if set to 0, all palette items are used).
DWORD biClrImportant: Indicates the number of color indexes that have an important impact on the image display, 0 means all are important.
Or take a chestnut, please see the picture:
The above is how to understand BMP image format shared by Xiaobian for everyone. If you happen to have similar doubts, you may wish to refer to the above analysis for understanding. If you want to know more about it, please pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.