如Size,Width和Height是Get()的性质System.Drawing.Image;
如何在C#中运行时调整Image对象的大小?
现在,我只是创建一个新的Image使用:
// objImage is the original Image
Bitmap objBitmap = new Bitmap(objImage, new Size(227, 171));
Run Code Online (Sandbox Code Playgroud) 所以我的逻辑存在缺陷,我需要一种更好,更正确的方法来调整c#app中的图像大小
我需要一个类似于这个设置的功能
public void ResizeImageForWeb(string OriginalFile, string NewFile, int MaxWidth, int MaxHeight, int Quality)
{
// Resize Code
}
Run Code Online (Sandbox Code Playgroud)
基本上,我是一个网页设计师,试图编写桌面应用程序.