You can always do it on the fly. Resize the image using
System.Drawing.Bitmap
class and save the resized instance directly to the using the class
System.Web.HttpResponse
:
http://msdn.microsoft.com/en-us/library/system.web.httpresponse%28v=vs.110%29.aspx[
^].
Look at the simple code sample shown on this MSDN page. It created the bitmap, draws some bimap on the fly and sends it in HTTP response via the
Bitmap.Save
method. You can do almost the same. Only you need to open original bitmap, create a new bitmap and draw the original bitmap on the new bitmap scaling it to the target size using appropriate
System.Drawing.Graphics.DrawImage
method:
http://msdn.microsoft.com/en-us/library/system.drawing.graphics.drawimage.aspx[
^].
—SA