Resize image

<< Click to Display Table of Contents >>

Navigation:  Início >

Resize image

Previous pageReturn to chapter overviewNext page

      public Bitmap Resize(Bitmap source, int width, int height)

       {

           Bitmap resized = new Bitmap(width, height);

          using (Graphics g = Graphics.FromImage((Image)resized))

           {

               g.DrawImage(source, 0, 0, width, height);

           }

          return resized;

       }