4

I have an image and I want to change the width & height of said image.

(For example Width = 200 Height = 120 and I want to change that to Width = 30 Height = 50)

What would be the best way to do so?

enter image description here

amir
  • 63
  • 2
  • 6
  • Could you show us what you have tried so far? –  Dec 28 '16 at 09:10
  • I upload an image of my code – amir Dec 28 '16 at 09:13
  • @RandomStranger i don't Know what to do – amir Dec 28 '16 at 09:16
  • Give [this](http://stackoverflow.com/questions/10442269/scaling-a-system-drawing-bitmap-to-a-given-size-while-maintaining-aspect-ratio) post a read, it might help you. Also, this seems like a question for google. I googled 'c# resize bitmap' and got that as a first result. –  Dec 28 '16 at 09:18

1 Answers1

8
Bitmap original = (Bitmap)Image.FromFile("DSC_0002.jpg");
Bitmap resized = new Bitmap(original,new Size(newWidth,newHeight));