Solutions have been found.
Private Sub ExtractImages()
Dim listpath As String = "D:\image folder\image-list\"
Dim mybytearray As Byte() = arr_imagelist.Item(0).arr_image
Dim name As String = arr_imagelist.Item(0).str_name.ToString.ToLower
Dim newname As String = System.Text.RegularExpressions.Regex.Replace(name.Trim, " ", "_", System.Text.RegularExpressions.RegexOptions.IgnoreCase)
Dim oFileStream As System.IO.FileStream
oFileStream = New System.IO.FileStream(listpath & newname & ".png", System.IO.FileMode.Create)
oFileStream.Write(mybytearray, 0, mybytearray.Length)
oFileStream.Close()
ResizeThis(listpath & name & ".png", 2000, Drawing.Imaging.ImageFormat.Png)
End Sub
Private Sub ResizeThis(ByVal imgpath As String, ByVal maxwidth As Integer, ByVal format As Drawing.Imaging.ImageFormat)
Dim fs As New FileStream(imgpath, FileMode.Open)
Dim original As Image = Image.FromStream(fs)
fs.Close()
Dim intWidth As Integer = original.Width : Dim intHeight As Integer = original.Height
Dim newWidth, newHeight As Integer
If intWidth > maxwidth Then
newWidth = maxwidth
newHeight = maxwidth * (intHeight / intWidth)
File.Delete(imgpath)
Using ResizedImage As New Bitmap(original, newWidth, newHeight)
ResizedImage.Save(imgpath, format)
End Using
End If
End Sub