Re size image not working C# [duplicate]
问题 This question already has answers here : Resize image proportionally with MaxHeight and MaxWidth constraints (3 answers) Closed 6 years ago . Am re sizing an image with the following code using (Image thumbnail = new Bitmap(100, 50)) { using (Bitmap source = new Bitmap(imageFile)) { using (Graphics g = Graphics.FromImage(thumbnail)) { g.CompositingQuality = CompositingQuality.HighQuality; g.InterpolationMode = InterpolationMode.HighQualityBicubic; g.SmoothingMode = SmoothingMode.HighQuality;