private static Image resizeImage(Image imgToResize, int x, int y)
{
int destWidth = x;
int destHeight = y;
Bitmap b = new Bitmap(destWidth, destHeight);
Graphics g = Graphics.FromImage((Image)b);
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
g.DrawImage(imgToResize, 0, 0, destWidth, destHeight);
g.Dispose();
return (Image)b;
}
This Blog is a programing portal, with tutorials and references relating to development subjects, including C#,Silverlight,WCF, Asp.Net,HTML, XML, CSS, JavaScript,Sql, Windows Administration.
Thursday, March 8, 2012
How to Resize Image programaticaly in C#
Following is the function to resize the image, give the image, width and height to this function it will return the resized image....
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment