This program is used to resize images.
using System; using System.Windows.Forms; using System.Drawing; using System.IO; class haha { [STAThread] static void Main() { string[] s=null; OpenFileDialog dlg = new OpenFileDialog(); dlg.Filter = "|*.jpg"; dlg.Multiselect = true; if (dlg.ShowDialog() == DialogResult.OK) { s = dlg.FileNames; } else return; Bitmap bit = , ); ; i < s.Length; i++) { Graphics.FromImage(bit).DrawImage(Image.FromFile(s[i]),,,,); bit.Save(i + ".png"); } MessageBox.Show("转换成功了"); } }