Resizing Images in VB.NET

Moshe picture Moshe · Jan 27, 2010 · Viewed 103.2k times · Source

I'd like to make a simple VB utility to resize images using vb.net. I am having trouble figuring out what vb class to use to actually manipulate the images. The Image class and the Bitmap class don't work.

Any ideas, hints, tips, tutorial links are greatly appreciated.

Thanks.

Answer

Muhammad Saqib picture Muhammad Saqib · Mar 18, 2014

You can simply use this one line code to resize your image in visual basic .net

Public Shared Function ResizeImage(ByVal InputImage As Image) As Image
        Return New Bitmap(InputImage, New Size(64, 64))
End Function

Where;

  1. "InputImage" is the image you want to resize.
  2. "64 X 64" is the required size you may change it as your needs i.e 32X32 etc.