Alex Rivera | Logout

Fastest Image Resizing in .NET

Asked 2009-07-28T15:56:08.977
9

I need the fastest library to resize full size images (some up to 9MB in size) to multiple sizes.

Here's the scenerio:

  • User uploads a photo
  • a FileSystemWatcher is running in a service watching the drop location (on a SAN)
  • When a new photo appears, the service will create 4 versions of the image at full JPEG quality:
    • 100px wide
    • 320px wide
    • 640px wide
    • 1280 wide

I'm not fussed if the library is C/C++ or anything else for that matter, as long as I can tap into it via .NET it's cool.

Also this will need to scale to possibly 1,000 active users.

Let me know your thoughts :)

Edit
Report

2 Answers

2

If money is no object, LeadTools is the traditional "go to" library for image processing. That being said, my first inclination would be to code it up using stock .NET GDI+ calls and then do some testing. It is likely this solution would be performant enough, but if not, you'll have a baseline from which you can compare other libraries and solutions. Anything involving spawning a command line tool will entail creating a separate process for each image, which could negate the benefit of going to unmanaged code.

answered 2009-07-28T16:03:58.013
0

I'm not sure about performance, but the open source OpenCV is an option.

void cvResize( const CvArr* I, CvArr* J, int interpolation=CV_INTER_LINEAR );

The function cvResize resizes image I so that it fits exactly to J. If ROI is set, the function consideres the ROI as supported as usual. the source image using the specified structuring element B that determines the shape of a pixel neighborhood over which the minimum is taken:

answered 2009-08-20T00:47:36.247

Your Answer