Resize Image C Maintain Aspect Ratio. Csharp by mingles444 on apr 23 2020 donate. Double desty 0.
Int sourceheight image height. Double destx 0. Public static system drawing image fixedsize image image int width int height bool needtofill region calculations int sourcewidth image width.
Your code will also look cleaner.
Int sourceheight image height. 1 set the destination width and height but this can result in skewed images when the aspect ratio is not identical call the function and set a fixed finalwidth and a fixed finalheight. Int sourcex 0. Csharp by mingles444 on apr 23 2020 donate.