赞
踩
#pragma comment(lib, "CORE_Magick++.lib")
#pragma comment(lib, "CORE_MagickCore_.lib")
#pragma comment(lib, "CORE_MagickWand.lib")
#include <Magick++.h>
Magick::Image image;
image.read(CUtils::Unicode_To_Utf8(m_filePath));
image.strip();
int nLevel = 70;
switch (m_nCompressLevel)
{
case LOWCOMPRESSLEVEL:
nLevel = 90;
break;
case NORMALCOMPRESSLEVEL:
nLevel = 70;
break;
case HIGHCOMPRESSLEVEL:
nLevel = 50;
break;
default:
nLevel = 70;
break;
}
image.quality(nLevel);
image.write(CUtils::Unicode_To_Utf8(m_tempFile));
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。