我的博客小站

实现bmp文件到png文件转换

#include<atlimage.h>

int main(int argc,char* argv[])
{
CImage image;
image.Load(
"test.bmp");
image.Save(
"test.png",ImageFormatPNG);
}

You can use CImage from either MFC or ATL.

When you create a project using CImage, you must define CString before you include atlimage.h. If your project uses ATL without MFC, include atlstr.h before you include atlimage.h. If your project uses MFC (or if it is an ATL project with MFC support), include afxstr.h before you include atlimage.h.

Likewise, you must include atlimage.h before you include atlimpl.cpp. To accomplish this easily, include atlimage.h in your stdafx.h.

posted on 2011-08-30 16:09  BIGSING  阅读(371)  评论(0编辑  收藏  举报

导航

我的博客小站