帝国CMS程序安装头像裁切插件,帝国CMS怎么实现头像裁切功能(21)

法律法规网 作者:小柯
来源 来源: 网络  法律法规网 时间: 2014-01-22 10:26:01  评论(/)

           //System.Drawing.Font f = new Font("Lucida Grande", 6);
           //System.Drawing.Brush b = new SolidBrush(Color.Gray);
           //设置高质量插值法
           graphics.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.High;
           //设置高质量,低速度呈现平滑程度  
           graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
           graphics.Clear(Color.White);
           graphics.DrawImage(originalImg, destRect, origRect, GraphicsUnit.Pixel);
           //G.DrawString("Ftodo.com", f, b,0,0);
           graphics.Dispose();
           originalImg.Dispose();
           if (File.Exists(pSavedPath))
           {
               File.SetAttributes(pSavedPath, FileAttributes.Normal);
               File.Delete(pSavedPath);
           }
           pa人体Img.Save(pSavedPath, ImageFormat.Jpeg);
           pa人体Img.Dispose();
tags:

站长推荐 / Recommend

最近更新 / Latest

站长推荐:

网站首页 关于我们 友情链接 广告服务 联系我们 网站地图 免责声明 WAP
Powered by LC123.NET 8.5  © 2009-2015
本站常年法律顾问 王正兴 律师