Function FixBitmapSize()
Function FixBitmapSize(ByVal b As Bitmap, ByVal scale As Byte) As Bitmap
'创建倍数表--------
Dim jishubiao() As Integer
Dim dimension As Integer = Math.Max(b.Width, b.Height)
ReDim jishubiao(dimension)
Dim n As Integer
Dim i As Integer
Do While n < dimension
jishubiao(n) = i
i += scale
n += 1
Loop
'---------------------
Dim tbmp As New Bitmap(b.Width * scale, b.Height * scale)
Dim CurrentColor As Color
Dim g As Graphics = Graphics.FromImage(tbmp)
For y As Integer = 0 To b.Height - 1
For x As Integer = 0 To b.Width - 1
' 获取源图象的当前坐标颜色
CurrentColor = b.GetPixel(x, y)
Dim circle As New Rectangle(jishubiao(x), jishubiao(y), scale + 1, scale + 1)
g.FillRectangle(New SolidBrush(CurrentColor), circle)
Next
Next
Return tbmp
End Function
'创建倍数表--------
Dim jishubiao() As Integer
Dim dimension As Integer = Math.Max(b.Width, b.Height)
ReDim jishubiao(dimension)
Dim n As Integer
Dim i As Integer
Do While n < dimension
jishubiao(n) = i
i += scale
n += 1
Loop
'---------------------
Dim tbmp As New Bitmap(b.Width * scale, b.Height * scale)
Dim CurrentColor As Color
Dim g As Graphics = Graphics.FromImage(tbmp)
For y As Integer = 0 To b.Height - 1
For x As Integer = 0 To b.Width - 1
' 获取源图象的当前坐标颜色
CurrentColor = b.GetPixel(x, y)
Dim circle As New Rectangle(jishubiao(x), jishubiao(y), scale + 1, scale + 1)
g.FillRectangle(New SolidBrush(CurrentColor), circle)
Next
Next
Return tbmp
End Function