实现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.

原文地址:https://www.cnblogs.com/daxingxing/p/2159709.html