代码改变世界

随笔档案-2018年04月

等比例缩放图片(C#)

2018-04-28 17:30 by newbirth, 2991 阅读, 收藏,
摘要: private Bitmap ZoomImage(Bitmap bitmap, int destHeight, int destWidth) { try { System.Drawing.Image sourImage = bitmap; int width = 0, height = 0; //按 阅读全文

C# ,asp.net 获取当前,相对,绝对路径

2018-04-28 15:41 by newbirth, 7412 阅读, 收藏,
摘要: 一、C#获取当前路径的方法: 1. System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName -获取模块的完整路径。 2. System.Environment.CurrentDirectory -获取和设置当前目录(该进程 阅读全文