首页 > 问答

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

作者:轶名 来源:网络 2014-01-22 10:26:01

帝国CMS是一个功能很强大的门户CMS系统,可是它的个人空间功能却并不强大,甚至会员头像都不能实现自动裁剪功能,要怎么给自己的帝国CMS系统安装头像裁切插件呢?最佳答案:头像裁切一直是一个棘手的问题,网上一些裁...


   {
     
       using (Image originalImg = Image.FromFile(pPath))
       {
           int width = originalImg.Width;
           int height = originalImg.Height;
           oPa人体Width = oPa人体Width * width / showWidth;
           oPa人体Height = oPa人体Height * width / showWidth;
           pOrigSta人体PointX = pOrigSta人体PointX * width / showWidth;
           pOrigSta人体PointY = pOrigSta人体PointY * width / showWidth;
           //创建新图
           Bitmap pa人体Img = new Bitmap(pPa人体Width, pPa人体Height);
           Graphics graphics = Graphics.FromImage(pa人体Img);
           //绘制的大小  默认pPa人体Sta人体PointX=0,pPa人体Sta人体PointY=0 即为左上原点处绘制  pPa人体Width=100,pPa人体Height=100
         
           Rectangle destRect = new Rectangle(new Point(pPa人体Sta人体PointX, pPa人体Sta人体PointY), new Size(pPa人体Width, pPa人体Height));//目标位置
           //绘制的原图部分
           Rectangle origRect = new Rectangle(new Point(pOrigSta人体PointX, pOrigSta人体PointY), new Size(oPa人体Width, oPa人体Height));//原图位置
 20/22   首页 上一页 18 19 20 21 22 下一页 尾页
上一篇 下一篇

I 热点 / Hot