string file = openFileDialog1.FileName; FileInfo f = new FileInfo(file); Image img = Image.FromFile(file); Bitmap b = new Bitmap(20,20); Graphics g = Graphics.FromImage((Image)b); g.InterpolationMode = InterpolationMode.HighQualityBicubic; g.DrawImage(img, 0, 0, 20,20); img.Save(file);
Graphics.FromImage
DrawImage
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)