} rgbquad;
the rgbquad structure describes a color consisting of relative intensities
of red, green, and blue. the bmicolors member of the bitmapinfo structure consists of an array of rgbquad structures.
member description
rgbblue specifies the intensity of blue in the color. rgbgreenspecifies the intensity of green in the color. rgbred specifies the intensity of red in the color. rgbreserved not used; must be set to zero.
see also
bitmapinfo
============================================================================
== rgb (2.x)
colorref rgb(cred, cgreen, cblue)
byte cred; /* red component of color */ byte cgreen; /* green component of color */ byte cblue; /* blue component of color */
the rgb macro selects an rgb color based on the parameters supplied and the color capabilities of the output device.
parameter description
cred specifies the intensity of the red color field. cgreen specifies the intensity of the green color field. cblue specifies the intensity of the blue color field.
returns
the return value specifies the resultant rgb color.
comments
the intensity for each argument can range from 0 through 255. if all three intensities are specified as zero, the result is black. if all three intensities are specified as 255, the result is white.
comments
the rgb macro is defined in windows.h as follows:
#define rgb(r,g,b) ((colorref)(((byte)(r)|((word)(g)<<8))| \ (((dword)(byte)(b))<<16)))
see also
getbvalue, getgvalue, getrvalue, paletteindex, palettergb
============================================================================
== bitmapcoreinfo (3.0)
typedef struct tagbitmapcoreinfo { /* bmci */ bitmapcoreheader bmciheader; rgbtriple bmcicolors[1]; } bitmapcoreinfo;
the bitmapcoreinfo structure fully defines the dimensions and color information for a device-independent bitmap (dib). windows applications should use the bitmapinfo structure instead of bitmapcoreinfo whenever possible.
member description
bmciheader specifies a bitmapcoreheader structure that contains information about the dimensions and color format of a dib.
bmcicolors specifies an array of rgbtriple structures that define the colors in the bitmap.
comments
the bitmapcoreinfo structure describes the dimensions and colors of a
bitmap. it is followed immediately in memory by an array of bytes which define the pixels of the bitmap. the bits in the array are packed together, but each scan line must be zero-padded to end on a long boundary. segment boundaries, however, can appear anywhere in the bitmap. the origin of the bitmap is the lower-left corner.
the bcbitcount member of the bitmapcoreheader structure determines the
number of bits that define each pixel and the maximum number of colors in the bitmap. this member may be set to any of the following values:
value meaning
1 the bitmap is monochrome, and the bmcicolors member must contain two entries. each bit in the bitmap array represents a pixel. if the bit is clear, the pixel is displayed with the color of the first entry in the 上一篇:bmp format(bmp文件格式) 下一篇:数据安全的注意事项 |