<p>Story:  The user uploads an image that will be added to a photo gallery.  As part of the upload process, we need to A) store the image on the web server's hard drive and B) store a thumbnail of the image on the web server's hard drive.</p>

<p>"Best" here is defined as </p>

<ul>
<li>Relatively easy to implement, understand, and maintain</li>
<li>Results in a thumbnail of reasonable quality</li>
</ul>

<p>Performance and high-quality thumbnails are secondary.</p>

I suppose your best solution would be using the
GetThumbnailImage
from the .NET
Image
class.
```
```
// Example in C#, should be quite alike in ASP.NET
// Assuming filename as the uploaded file
using ( Image bigImage = new Bitmap( filename ) )
{
   // Algorithm simplified for purpose of example.
   int height = bigImage.Height / 10;
   int width = bigImage.Width / 10;

   // Now create a thumbnail
   using ( Image smallImage = image.GetThumbnailImage( width, 
                                                       height,
                                                       new Image.GetThumbnailImageAbort(Abort), IntPtr.Zero) )
   {
      smallImage.Save("thumbnail.jpg", ImageFormat.Jpeg);
   }
}
```
```