C# Image Resizer

时间:2023-03-10 07:22:51
C# Image Resizer

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("转换成功了");
     }
 }