当前位置:技术中心首页 >> 数据恢复 >> Graphics File Formats(Windows的.BMP .CUR .ICO文件的格式,有范例)</FONT>
Graphics File Formats(Windows的.BMP .CUR .ICO文件的格式,有范例)</FONT>
2007-01-29 10:40:39  作者:  来源:  浏览次数:57  文字大小:【】【】【

this topic describes the graphics-file formats used by the microsoft windows
operating system. graphics files include bitmap files, icon-resource files,
and cursor-resource files.

bitmap-file formats

windows bitmap files are stored in a device-independent bitmap (dib) format
that allows windows to display the bitmap on any type of display device. the
term "device independent" means that the bitmap specifies pixel color in a
form independent of the method used by a display to represent color. the
default filename extension of a windows dib file is .bmp.

bitmap-file structures

each bitmap file contains a bitmap-file header, a bitmap-information header,
a color table, and an array of bytes that defines the bitmap bits. the file
has the following form:

bitmapfileheader bmfh;
bitmapinfoheader bmih;
rgbquad acolors[];
byte abitmapbits[];

the bitmap-file header contains information about the type, size, and layout
of a device-independent bitmap file. the header is defined as a
bitmapfileheader structure.

the bitmap-information header, defined as a bitmapinfoheader structure,
specifies the dimensions, compression type, and color format for the bitmap.

the color table, defined as an array of rgbquad structures, contains as many
elements as there are colors in the bitmap. the color table is not present
for bitmaps with 24 color bits because each pixel is represented by 24-bit
red-green-blue (rgb) values in the actual bitmap data area. the colors in

the
table should appear in order of importance. this helps a display driver
render a bitmap on a device that cannot display as many colors as there are
in the bitmap. if the dib is in windows version 3.0 or later format, the
driver can use the biclrimportant member of the bitmapinfoheader structure

to
determine which colors are important.

the bitmapinfo structure can be used to represent a combined
bitmap-information header and color table. the bitmap bits, immediately
following the color table, consist of an array of byte values representing
consecutive rows, or "scan lines," of the bitmap. each scan line consists of
consecutive bytes representing the pixels in the scan line, in left-to-right
order. the number of bytes representing a scan line depends on the color
format and the width, in pixels, of the bitmap. if necessary, a scan line
must be zero-padded to end on a 32-bit boundary. however, segment boundaries
can appear anywhere in the bitmap. the scan lines in the bitmap are stored
from bottom up. this means that the first byte in the array represents the
pixels in the lower-left corner of the bitmap and the last byte represents
the pixels in the upper-right corner.

the bibitcount member of the bitmapinfoheader structure determines the

number
of bits that define each pixel and the maximum number of colors in the
bitmap. these members can have any of the following values:

value meaning

1 bitmap is monochrome and the color table contains two entries. each
bit in the bitmap array represents a pixel. if the bit is clear, the pixel

0

顶一下

0

踩一下
相关文章
内页链接 | 友情链接 | 诚聘英才 | 关于我们 | 版权声明 | 联系我们 | 网站公告 | 广告服务
回天数据恢复中心 版权所有
浙江总部:杭州市文三路388号钱江科技大厦10楼1016室 (学院路和文三路交汇路口颐高数码广场),东方通信大厦旁边.
地址 :上海市埔东新区张扬路628弄东明广场2号楼23楼C室(太平洋三期电脑城正对面,百脑会电脑城左侧)
全国服务热线 :400-889-1122(全国),0571-85121630(杭州),021-28877655(上海) 传真 :0571-56771013