Resize image in .NET
This will resize image to be 1024 height or width (whichever is bigger). Explore other options to look for things like image quality. using (var image = Image.FromFile(file.FullName)){ int newHeight, newWidth; if (image.Height > image.Width) { newHeight = 1024; newWidth = (int)(1024.0 * image.Width / image.Height); } else { newWidth = 1024; newHeight = (int)(1024.0 […]