Resizing Images in VB.NET

前端 未结 6 1077
忘掉有多难
忘掉有多难 2020-12-15 23:40

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

6条回答
  •  南笙
    南笙 (楼主)
    2020-12-16 00:26

    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.

提交回复
热议问题