Guest User

Untitled

a guest
Jan 14th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. Dim a As Color = Color.FromArgb(255, 255, 128, 128)
  2. Dim bitmap As New Bitmap("C:abcimagetempl.jpg")
  3. Dim input = InputBox("What do you want to encode into image?")
  4. Dim characters As Array
  5. characters = input.ToCharArray
  6. Dim Width As Int32 = bitmap.Width
  7. Dim Height As Int32 = bitmap.Height
  8. Dim textcord As Integer = 0
  9. For y As Int32 = 0 To Height - 1
  10. For x As Int32 = 0 To Width - 1
  11. If textcord > Len(characters) Then
  12. bitmap.SetPixel(x, y, Color.Black)
  13. Else
  14. Select Case characters(textcord)
  15. Case "a" Or "A"
  16. bitmap.SetPixel(x, y, Color.FromArgb(255, 255, 128, 128))
  17. End Select
  18. End If
  19. textcord += 1
  20. Next
  21. Next
  22. MsgBox("Done")
  23. bitmap.Save("C:abcimageoutputsasdf.jpg")
Add Comment
Please, Sign In to add comment