Results 1 to 2 of 2
  1. #1
    Gbstar's Avatar
    Join Date
    Oct 2011
    Gender
    male
    Posts
    31
    Reputation
    10
    Thanks
    0
    My Mood
    Pensive

    Need Some Help With This Code

    I would need some help with this code its a pixel recognition source code in vb but I can't get it to work
    I know there is a picture box called pic and a text box called rtb

    heres the code if anyone could help it would be nice or point me to a better one

    Code:
    Dim sz(9) As String
            sz(0) = "0000110000001111000011001100110000110110000110110000110110000110011001100001
    11100"
            sz(1) = "0000110000000110000001110000011110000000110000000110000000110000000110000000
    11000000011000001111110"
            sz(2) = "0001111000011001100110000110000000110000001100000011000000110000001100000011
    00000011111111"
            sz(3) = "0011111000110001100000000110000001100000111000000001100000000110000000110110
    00110001111100"
            sz(4) = "0000001100000011100000111100001101100011001100110001100111111110000001100000
    00110000000110"
            sz(5) = "0111111100110000000110000000110111000111001100000000110000000110110000110011
    00110000111100"
            sz(6) = "0001111000011001100110000100110000000110111000111001100110000110110000110011
    00110000111100"
            sz(7) = "0111111110000000110000000110000001100000011000000110000001100000011000000110
    00000011000000"
            sz(8) = "0001111000011001100110000110011001100001111000011001100110000110110000110011
    00110000111100"
            sz(9) = "0001111000011001100110000110110000110011001110001110110000000110010000110011
    00110000111100"
    
            Dim x As Integer = 0
            Dim y As Integer = 0
            Dim nLine As Integer = 0
            Dim nGroup As Integer = 0
            Dim szGroup(5) As String
            Dim szTemp As String = ""
            Dim bmp As Bitmap = pic.Image.Clone
            For y = 11 To pic.Height - 10 Step 1
                nLine = 1
                nGroup = 0
                For x = 7 To pic.Width - 9 Step 1
                    If bmp.GetPixel(x, y).ToArgb = Color.White.ToArgb Then
                        szTemp = szTemp & "0"
                    ElseIf bmp.GetPixel(x, y).ToArgb = Color.Black.ToArgb Then
                        szTemp = szTemp & "1"
                    End If
                    If nLine = 9 Then
    
                        szGroup(nGroup) = szGroup(nGroup) & szTemp
                        szTemp = ""
                        nLine = 1
                        nGroup += 1
                    Else
                        nLine += 1
                    End If
                Next
            Next
            For x = 0 To 5
                For y = 0 To 9
                    If szGroup(x) = sz(y) Then
                        rtb.Text = rtb.Text & y.ToString
                    End If
                Next
            Next

  2. #2
    Hassan's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    System.Threading.Tasks
    Posts
    4,764
    Reputation
    495
    Thanks
    2,133
    My Mood
    Dead
    Please learn the basics. You are heading to be a copy paster if we continue to help you. I am closing this. Start with the basics and if you are having trouble with that, I'll gladly help you.

    Closed.

Similar Threads

  1. [Help Request] Need some help with my server premisions
    By pero122 in forum Minecraft Help
    Replies: 5
    Last Post: 11-07-2011, 10:55 PM
  2. [Help Request] I need some help with binding eps7
    By v1zhaixingv1 in forum Vindictus Help
    Replies: 3
    Last Post: 05-18-2011, 09:25 PM
  3. I need help with this code in C#
    By trevor206 in forum Programming Tutorial Requests
    Replies: 0
    Last Post: 08-18-2009, 05:40 PM
  4. need some help with domains.
    By fastbullet in forum WarRock - International Hacks
    Replies: 1
    Last Post: 04-26-2007, 08:44 AM
  5. need some help with client exe.
    By barney in forum Hack Requests
    Replies: 2
    Last Post: 11-03-2006, 10:05 PM