Hi @Abhinav
please use the following code
System.Drawing.Bitmap originalBMP = new System.Drawing.Bitmap(FileUploadCtrlPatientPhoto.FileContent);
int origWidth = originalBMP.Width;
int origHeight = originalBMP.Height;
int sngRatio = origWidth / origHeight;
int newWidth = 100;
if (sngRatio == 0)
sngRatio = 1;
int newHeight = newWidth / sngRatio;
System.Drawing.Bitmap newBMP = new System.Drawing.Bitmap(originalBMP, newWidth, newHeight);
System.Drawing.Graphics oGraphics = System.Drawing.Graphics.FromImage(newBMP);
oGraphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
oGraphics.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
oGraphics.DrawImage(originalBMP, 0, 0, 120, 130);
newBMP.Save(UploadPath);
originalBMP.Dispose();
newBMP.Dispose();
oGraphics.Dispose();
Hope this will help you
Thanks