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.
资料我都提供了,大家帮忙解答,谢谢

解决方案 »

  1.   

    The BITMAPINFOHEADER structure is extended to allow a JPEG or PNG image to be passed as the source image to StretchDIBits.意思说的很清楚啊,允许额外的一些图像格式通过 StretchDib 来实现
      

  2.   


    不通过这个函数, 直接操作位图结构体可以嘛?既然结构体里的成员字段说了:BI_JPEG  Indicates that the image is a JPEG image.
     BI_PNG  Indicates that the image is a PNG image.
     (尽管是压缩字段里的对这2个格式的解释)那就说明我们可以保存jpge, png这2中类型的图片 像保存bmp一样的方式来保存!!!是否是这个意思:像保存bmp一样的方式来保存jpeg, png图片, bmp图片的保存方式是通过这几个结构体,肯定不会使用所谓的:stretchdibits 这个函数的!!!因为bmp格式的,根本没有必要使用这个函数
      

  3.   

    英语要好好学一下啊各位,
    The BITMAPINFOHEADER structure is extended to allow a JPEG or PNG image to be passed as the source image to StretchDIBits.
    的意思是 BITMAPINFOHEADER 被扩展以便可以使用 JPEG或者PNG图像作为StretchDIBits函数的源图像实际上
    因为StretchDIBits函数需要一个 BITMAPINFO结构(其中包含了BITMAPINFOHEADER)作为输入参数,通常是直接输入bmp位图信息的,扩展后可以直接使用压缩后的位图,如jpg、png等图像作为输入数据