Very simple and practical function to resize an image. If you have something that can crop and image I would appreciate it :)
Public Function ResizeImage(ByVal iImage As Bitmap, ByVal ScaleX As Single, ByVal ScaleY As Single, ByVal iMode As InterpolationMode) As Bitmap
'Receives an image as input and scales it up or down
Dim g As Graphics
Dim sImage As Bitmap = New Bitmap(CInt(iImage.Width * ScaleX), CInt(iImage.Height * ScaleY))
g = Graphics.FromImage(sImage)
g.InterpolationMode = iMode
g.DrawImage(iImage, 0, 0, sImage.Width, sImage.Height)
ResizeImage = sImage
End Function
Posted 1 month ago #
You must log in to post.
.net address attributes browsers censored config css dates email validation filter firefox floor functions html ie ie fix image functions images input ip javascript links mail match math min-height min-width netscape opera php preloading print regex script smtp string styles textbox time validation variables visual basic