




















'str欲添加的文字 , width 圖片寬度,height圖片高度,filename 圖片名
Private Function CreatePic(ByVal Str As String, ByVal width As Integer, ByVal heightAs Integer, ByVal filename As String)
Dim bitmap As Bitmap = New Bitmap(width, height, System.Drawing.Imaging.PixelFormat.Format32bppRgb)
Dim g As Graphics = Graphics.FromImage(bitmap)
g.Clear(Color.White)
Dim f As Font = New Font("System", 9)
Dim s As SolidBrush = New SolidBrush(Color.Black)
g.DrawString(Str, f, s, 0, 0)
Try
bitmap.Save(filename, System.Drawing.Imaging.ImageFormat.Gif)
Catch ex As Exception
End Try
g.Dispose()
bitmap.Dispose()
End Function
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。