赞
踩
/// <summary>
/// vpro保存图片到本地
/// </summary>
/// <param name="cogImage">输入图像</param>
/// <param name="fileName">文件名</param>
private void SaveImage(ICogImage cogImage, string fileName)
{
if (null == cogImage) return;
using (CogImageFileTool tool = new CogImageFileTool())
{
tool.InputImage = cogImage;
tool.Operator.Open(fileName, CogImageFileModeConstants.Write);
tool.Run();
}
}
/// <summary>
/// vpro读取文件到内存
/// </summary>
/// <param name="fileName">文件名(全路径)</param>
/// <returns></returns>
private ICogImage ReadImage(string fileName)
{
ICogImage tempImage = null;
using (CogImageFileTool tool = new CogImageFileTool())
{
tool.Operator.Open(fileName, CogImageFileModeConstants.Read);
tool.Run();
tempImage = tool.OutputImage;
}
return tempImage;
}
赞
踩
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。