Resizing C #

Just working on the image downloader / resizer in my asp.net 4 web form project. Does anyone know of a C # method for resizing uploaded images that can help with those that are smaller than the minimum required size?

Obviously, the quality will be suspicious if you resize it, so did anyone find a way to possibly create a new image that is the right size, which can be plain white, and then place the original image on top of this white background?

thank

Change - ImageResizer.net now works well, but with resizing the job when the image is smaller. See the comment below IrishChieftains answer for full details:

COMPLETION EDIT #################

Ok, I swear I tried this last night and it didn’t work, so maybe I just need a clean browser or restarting VS2010, but for everyone who is interested, here is my final solution. The key was scale=upscalecanvas:

int maxWidth = 400;
int maxHeight = 200;

ImageBuilder.Current.Build(saveLocation, saveLocation, new ResizeSettings("width=" + maxWidth + "&height=" + maxHeight + "&mode=pad&bgcolor=DDDDDD&anchor=middlecenter&scale=upscalecanvas"));

Impossible to rate ImageResizer.net high enough - great program

+5
source share
1 answer

The best library has ImageResizer. If this does not help, you will eventually try it manually ...

Asp.net jpeg size standardization

+4
source

All Articles