01.
Dim
objBitmap
As
Bitmap
02.
03.
If
intHeight > 0
Then
04.
objBitmap =
New
Bitmap(objGraphic, intWidth, intHeight)
05.
Else
06.
If
objGraphic.Width > intWidth
Then
07.
Dim
ratio
As
Double
= objGraphic.Height / objGraphic.Width
08.
intHeight = ratio * intWidth
09.
objBitmap =
New
Bitmap(objGraphic, intWidth, intHeight)
10.
Else
11.
objBitmap =
New
Bitmap(objGraphic)
12.
End
If
13.
End
If