I have to implement this function in my project while I add this function I get error near new bitmap
<pre><code>Public Shared Function ScaleImage(image As System.Drawing.Image, maxHeight As Integer) As System.Drawing.Image
    Dim ratio = CDbl(maxHeight) / image.Height
    Dim newWidth = CInt(Math.Truncate(image.Width * ratio))
    Dim newHeight = CInt(Math.Truncate(image.Height * ratio))
    Dim newImage = **New Bitmap(newWidth, newHeight)**
    Using g = Graphics.FromImage(newImage)
        g.DrawImage(image, 0, 0, newWidth, newHeight)
    End Using
    Return newImage
End Function
</code></pre>