 |
北京总部: 4006-505-646 |
天 津 部: 4006-505-646 |
上 海 部: 4006-505-646 |
深 圳 部: 4006-505-646 |
广 州 部: 4006-505-646 |
重 庆 部: 4006-505-646 |
南 京 部: 4006-505-646 |
其它地区: 4006-505-646 | | |
|
 |
 |
Graphics File Formats(Windows的.BMP .CUR .ICO文件的格式,有范例)
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 byte. in addition, the first byte of the pair can be set to zero to indicate an escape that denotes an end of line, end of bitmap, or a delta. the interpretation of the escape depends on the value of the second byte of the pair. the following list shows the meaning of the second byte:
value meaning
0 end of line. 1 end of bitmap. 2 delta. the two bytes following the escape contain unsigned values indicating the horizontal and vertical offset of the next pixel from the current position.
absolute mode is signaled by the first byte set to zero and the second byte set to a value between 0x03 and 0xff. in absolute mode, the second byte represents the number of bytes that follow, each of which contains the color | |
 |
上一篇:bmp format(bmp文件格式) |
下一篇:深入了解EFS加解密原理 | |
 | | |