the following comments section.
bi_rle4 specifies a run-length encoded format for bitmaps with 4 bits per pixel. the compression format is a 2-byte format consisting of a count byte followed by two word-length color indexes. for more information, see the following comments section.
bisizeimage specifies the size, in bytes, of the image. it is valid to set this member to zero if the bitmap is in the bi_rgb format.
bixpelspermeter specifies the horizontal resolution, in pixels per meter, of the target device for the bitmap. an application can use this value to
select a bitmap from a resource group that best matches the characteristics of the current device.
biypelspermeter specifies the vertical resolution, in pixels per meter, of the target device for the bitmap.
biclrused specifies the number of color indexes in the color table actually used by the bitmap. if this value is zero, the bitmap uses the maximum number of colors corresponding to the value of the bibitcount
member. for more information on the maximum sizes of the color table, see the description of the bitmapinfo structure earlier in this topic.
if the biclrused member is nonzero, it specifies the actual number of colors that the graphics engine or device driver will access if the bibitcount member is less than 24. if bibitcount is set to 24, biclrused specifies the size of the reference color table used to optimize performance of windows color palettes. if the bitmap is a packed bitmap (that is, a bitmap in which the bitmap array immediately follows the bitmapinfo header and which is referenced by a single pointer), the biclrused member must be set to zero or to the actual size of the color table.
biclrimportant specifies the number of color indexes that are considered important for displaying the bitmap. if this value is zero, all colors are important.
comments
the bitmapinfo structure combines the bitmapinfoheader structure and a color table to provide a complete definition of the dimensions and colors of a windows 3.0 or later dib. for more information about specifying a windows
3.0 dib, see the description of the bitmapinfo structure.
an application should use the information stored in the bisize member to locate the color table in a bitmapinfo structure as follows:
pcolor = ((lpstr) pbitmapinfo + (word) (pbitmapinfo->bmiheader.bisize))
windows supports formats for compressing bitmaps that define their colors with 8 bits per pixel and with 4 bits per pixel. compression reduces the
disk and memory storage required for the bitmap. the following paragraphs
describe these formats.
bi_rle8
when the bicompression member is set to bi_rle8, the bitmap is compressed using a run-length encoding format for an 8-bit bitmap. this format may be compressed in either of two modes: encoded and absolute. both modes can
occur anywhere throughout a single bitmap.
encoded mode consists of two bytes: the first byte specifies the number of consecutive pixels to be drawn using the color index contained in the second 上一篇:bmp format(bmp文件格式) 下一篇:数据安全的注意事项 |