Merge an image, a background and Text into a single image
问题 I found this code here: Private _BackgroundColours As New List(Of String)() From { _ "339966", _ "3366CC", _ "CC33FF", _ "FF5050" _ } Public Function GenerateRactangle(firstName As String, lastName As String) As MemoryStream Dim imgSize() As Integer = {800, 800} Dim avatarString As String = String.Format("{0}{1}", firstName(0), lastName(0)).ToUpper() Dim bgColour = _BackgroundColours(New Random().[Next](0, _BackgroundColours.Count - 1)) Dim bmp As Bitmap = New Bitmap(imgSize(0), imgSize(1))