位图的一点小问题,老师们帮忙看看,多谢
msdn的上资料,贴个链接, 资料有一句话:
http://msdn.microsoft.com/en-us/library/windows/desktop/dd183376(v=vs.85).aspx
The BITMAPINFOHEADER structure is extended to allow a JPEG or PNG image to be passed as the source image to StretchDIBits.
这话是啥意思?
为啥要通过这个函数?
BITMAPINFOHEADER 这个结构体,msdn已经锁的很清楚了, jpeg等图片也是可以使用的,既然可以用,为啥要用
strecthdibits这个函数呢?
以下是该结构体的一个字段的资料:
biCompression
The type of compression for a compressed bottom-up bitmap (top-down DIBs cannot be compressed). This member can be one of the following values.
Value Description
BI_RGB An uncompressed format.
BI_RLE8 A run-length encoded (RLE) format for bitmaps with 8 bpp. The compression format is a 2-byte format consisting of a count byte followed by a byte containing a color index. For more information, see Bitmap Compression.
BI_RLE4 An RLE format for bitmaps with 4 bpp. The compression format is a 2-byte format consisting of a count byte followed by two word-length color indexes. For more information, see Bitmap Compression.
BI_BITFIELDS Specifies that the bitmap is not compressed and that the color table consists of three DWORD color masks that specify the red, green, and blue components, respectively, of each pixel. This is valid when used with 16- and 32-bpp bitmaps.
BI_JPEG Indicates that the image is a JPEG image.
BI_PNG Indicates that the image is a PNG image.
资料我都提供了,大家帮忙解答,谢谢