读书人

请教VC中怎么把不同格式的图片(Jpeg,

发布时间: 2012-03-27 13:44:24 作者: rapoo

请问VC中如何把不同格式的图片(Jpeg,Png,Bmp,Gif...)读入规定尺寸的buffer(Bitmap 矩阵)
如题,我现在只是要实现这个功能,如何能把不同格式的图片读入buffer(Row*Column 矩阵 In-Memory Bitmap格式),注意不是Windows BMP 格式。请问目前最常用的方法是那些,非常感谢。

C/C++ code
/** * Renders an image based on the specified GraphicInfo structure. Image will be rendered to specified height * and width to specified buffer. * * @param    graphicType            Graphic type, Jpeg, Png, Dib or BMP. * @param    pImageStream        Input stream of graphic. * @param    imageSize            Size of graphic in bytes or number of bytes that can be *                                read from above stream. * @param    width                Desired width of rendered graphic. * @param    height                Desired height of rendered graphic. * @param    pImageData            Pointer to a buffer where image will be rendered. *  */void ImageHelper::renderBitmapGraphic(GraphicType graphicType, InputStream* pImageStream, int32_t streamSize, int32_t width,                                       int32_t height, int32_t* pImageData){//函数体}


[解决办法]
查哈OPENCV看下

[解决办法]
CImage
[解决办法]
确实,就是将DC上的HBITMAP对象保存成BMP文件而已,网上有现在的代码。
[解决办法]
Opencv、CxImage,差不多的图像处理库都可以吧
[解决办法]
GDI+的CImage就可以了。

读书人网 >VC/MFC

热点推荐