不知道GDI+本身是不是有这样的函数,最好是能把16位,8位的都可以转换成24位RGB的.谢谢!

解决方案 »

  1.   

    Bitmap::ConvertFormat应该可以.Status ConvertFormat(          PixelFormat format,
        DitherType dithertype,
        PaletteType palettetype,
        ColorPalette *palette,
        REAL alphaThresholdPercent
    );第一个参数可以取值为 PixelFormat24bppRGB
      

  2.   

    试试图像保存是用EncoderParameters参数改变设置
      

  3.   

    Status LockBits( const Rect *rect,
        UINT flags,
        PixelFormat format,
        BitmapData *lockedBitmapData
    );format
    [in] Integer that specifies the format of the pixel data in the temporary buffer. The pixel format of the temporary buffer does not have to be the same as the pixel format of this Bitmap object. The PixelFormat data type and constants that represent various pixel formats are defined in Gdipluspixelformats.h. For more information about pixel format constants, see Image Pixel Format Constants. Microsoft Windows GDI+ version 1.0 does not support processing of 16-bits-per-channel images, so you should not set this parameter equal to PixelFormat48bppRGB, PixelFormat64bppARGB, or PixelFormat64bppPARGB.