Alaikum Assalam,
If you want to crop and perform other image transformation in ASP.NET, on server side, you can use
System.Drawing
. Suppose you have some image. You can create an instance of other image,
System.Drawing.Bitmap
and get the instance of
System.Drawing.Bitmap
out of it. It allows you to draw on this bitmap. Here is how:
http://msdn.microsoft.com/en-us/library/system.drawing.graphics.fromimage.aspx[
^].
Then you can do any drawing on this bitmap, in particular, draw some other image, either with stretch, of cropped. Please see all different
System.Drawing.Graphics.DrawImage
methods:
http://msdn.microsoft.com/en-us/library/system.drawing.graphics.aspx[
^].
You can save the image in the file, but usually you deliver image immediately in HTTP response, without any file, using appropriate media type. Please see this MDSN page on
System.Web.HttpResponse
for the example of working with an image:
http://msdn.microsoft.com/en-us/library/system.web.httpresponse.aspx[
^].
Good luck,
—SA