Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim a As Color = Color.FromArgb(255, 255, 128, 128)
- Dim bitmap As New Bitmap("C:abcimagetempl.jpg")
- Dim input = InputBox("What do you want to encode into image?")
- Dim characters As Array
- characters = input.ToCharArray
- Dim Width As Int32 = bitmap.Width
- Dim Height As Int32 = bitmap.Height
- Dim textcord As Integer = 0
- For y As Int32 = 0 To Height - 1
- For x As Int32 = 0 To Width - 1
- If textcord > Len(characters) Then
- bitmap.SetPixel(x, y, Color.Black)
- Else
- Select Case characters(textcord)
- Case "a" Or "A"
- bitmap.SetPixel(x, y, Color.FromArgb(255, 255, 128, 128))
- End Select
- End If
- textcord += 1
- Next
- Next
- MsgBox("Done")
- bitmap.Save("C:abcimageoutputsasdf.jpg")
Add Comment
Please, Sign In to add comment