Resizing a jpeg image C#

I need help with some code to resize a jpeg image when i load it i want it to be about a 10th of the size it is but try and keep the same aspect ratio if at all possible ( not a big deal though)
npl77Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Raynard7Commented:
Hi,

since you are loading it already - you could pass the loaded image to the below function,

from
http://www.experts-exchange.com/Programming/Programming_Languages/C_Sharp/Q_21683649.html

public static Image resizeImage( Image img, int new_width, int new_height )
{
     Bitmap b = new Bitmap( new_width, new_height ) ;
     Graphics g = Graphics.FromImage( (Image ) b ) ;
     
     g.DrawImage( img, 0, 0, new_width, new_height ) ;
     g.Dispose() ;
     
     return (Image ) b ;
}

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
gdupadhyayCommented:
Hi,
You can get more detail info. abt. resizeing of image on

http://www.codeproject.com/csharp/imgresizoutperfgdiplus.asp

also u can get similar answer on

http://forums.asp.net/thread/1393026.aspx

Thanks,
Ganesh Dutt Upadhyay
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.