I recently answered how to resize a bitmap using .NET. All I would to add just for you: do it in cycle and save all those files under the names of you choice. Please see this answer:
resize image in vb.net[
^].
This is all really simple and can give you reasonable performance.
The second options is using the ready-to-use utility (and probably enjoying the boost in performance). I would strongly recommend FFmpeg or libavcodec utility. Please see:
http://en.wikipedia.org/wiki/Ffmpeg[
^],
http://ffmpeg.org/[
^],
http://en.wikipedia.org/wiki/Libavcodec[
^],
http://libav.org/[
^].
In both cases, you can get free open-source utilities which can make nearly everything. (And this is much better than ImageMagic which also I tried before, even though it would work for your, too. With ffMpeg, I used to solve most tricky problems when the solution was really hard to find.)
Now, even if you want to run it all through .NET application (even ASP.NET), you can simply run it as a separate process using
System.Diagnostics.Process.Start
. You can redirect the
StandardOutput
and
StandardError
, to capture output or to simply hide it. You will find more than enough examples in the documentation of this class. The file name for the start of process does not have to be the utility. It could also be a batch file starting the utility with different parameters. However, with thousands of images you have I would do it directly in code, not batch file, as you may need to calculate file names and a lot more.
There is another, more complex option: you can find a .NET wrapper library of the ffMPeg or LibAV library and use it immediately in your .NET application, but this would take more labor.
Anyway, if you need some more information, please ask your follow-up questions. I often do massing image and other media processing and know a big deal of it.
Good luck,
—SA