// resizebmp2.cs using System.Drawing; using System.Drawing.Imaging; class ResizeBitmap2 { public static void Main() { Bitmap src = new Bitmap("mypicture.jpg"); int width = src.Width / 2; int height = src.Height / 2; Bitmap dest = new Bitmap(src, width, height); dest.Save("mypicture2.jpg", ImageFormat.Jpeg); } } // コンパイル方法:csc resizebmp2.csc