Results 1 to 5 of 5
  1. #1
    jhonnel is offline Member
    Join Date
    Oct 2014
    Posts
    1
    Rep Power
    0

    Post The text-to-image algorithm

    Encryptor
    Java Code:
    Private Sub cmdDeleteMessage_Click()
    If txtMessage.Text = "" Then
    a = MsgBox("No message to delete!", vbInformation, "")
    Else: If MsgBox("Do you want to create a new message?", vbYesNo, "New") = vbNo Then Exit Sub
                txtMessage.Text = ""
                Pic.Picture = LoadPicture()
            End If
    End Sub
    
    Private Sub cmdEncrypt_Click()
    Dim Index As Integer
    Call Sleep(200)
    If txtMessage.Text = "" Then
        reminder = MsgBox("No Message Found!", vbInformation, "")
        Exit Sub
    End If
        a = MsgBox("Are you sure you want to encrypt this message?", vbYesNo, "Reminder")
        If a = vbYes Then
        Call Encoder
    End If
    cmdSaveImage.Enabled = True
    End Sub
    
    Private Sub cmdOpenText_Click()
    Dim SS As String
    On Error GoTo a
    Me.CommonDialog1.Filter = "Text files (*.txt)|*.txt"
    CommonDialog1.ShowOpen
    Open CommonDialog1.FileName For Input As #1
        Do Until EOF(1)
          Input #1, S
          SS = SS & S & vbCrLf
        Loop
      Close #1
    a:
      txtMessage.Text = SS
       End Sub
    
    Private Sub cmdSaveImage_Click()
    On Error Resume Next
    Me.CommonDialog1.Filter = "Image (*.png)|*.png"
    CommonDialog1.Flags = cdlOFNExplorer Or cdlOFNOverwritePrompt
    CommonDialog1.ShowSave
    Open CommonDialog1.FileName For Output As #1
    Print #1, Pic.Image
    Close #1
    BackPic.Picture = Pic.Image
    SavePicture BackPic.Image, CommonDialog1.FileName
    End Sub
    
    Private Sub cmdSaveMessage_Click()
    If txtMessage.Text = "" Then
    note = MsgBox("There is no message to be save!", vbInformation, "")
    Else
    B = MsgBox("Are you sure you want to save this message?", vbYesNo, "Reminder")
    If B = vbYes Then
    On Error Resume Next
    Me.CommonDialog1.Filter = "Text files (*.txt)|*.txt"
    CommonDialog1.Flags = cdlOFNExplorer Or cdlOFNOverwritePrompt
    CommonDialog1.ShowSave
    Open CommonDialog1.FileName For Output As #1
    Print #1, txtMessage.Text
    Close #1
    End If
    End If
    End Sub
    
    Private Sub Form_Load()
    Pic.Top = 375
    Pic.Left = 270
    Pic.Width = 3000
    Pic.Height = 1800
    BackPic.Width = 3000
    BackPic.Height = 1800
    cmdSaveImage.Enabled = False
    End Sub
    
    Private Sub Form_Unload(Cancel As Integer)
      End
    End Sub
    Decryptor
    Java Code:
    Private Sub cmdDecrypt_Click()
    If Pic.Picture = LoadPicture() Then
    A = MsgBox("Please select an image", vbInformation, "")
    Exit Sub
    Else
    B = MsgBox("Are you sure you want to decrypt the image?", vbYesNo, "Reminder")
    If B = vbYes Then
    Call Sleep(200)
    Call Decoder
    End If
    End If
    End Sub
    
    Private Sub cmdOpenImage_Click()
    On Error GoTo A
    Me.CommonDialog1.Filter = "Image (*.png)|*.png"
    CommonDialog1.ShowOpen
    Open CommonDialog1.FileName For Input As #1
        Do Until EOF(1)
          Input #1, S
         Pic.Picture = LoadPicture(CommonDialog1.FileName)
        Loop
      Close #1
    A:
    txtMessage.Text = ""
    txtMessage.Enabled = True
    End Sub
    
    Private Sub cmdSaveMessage_Click()
    If txtMessage.Text = "" Then
    A = MsgBox("There's no message!", vbInformation, "")
    Else
    B = MsgBox("Are you sure you want to save this message?", vbYesNo, "")
    If B = vbOK Then
    On Error Resume Next
    Me.CommonDialog1.Filter = "Text files (*.txt)|*.txt"
    CommonDialog1.Flags = cdlOFNExplorer Or cdlOFNOverwritePrompt
    CommonDialog1.ShowSave
    Open CommonDialog1.FileName For Output As #1
    Print #1, txtMessage.Text
    Close #1
    End If
    End If
    End Sub
    
    Private Sub Form_Load()
    Pic.Top = 375
    Pic.Left = 270
    Pic.Width = 3000
    Pic.Height = 1800
    'Pic.Line (0, 0)-(199, 119), RGB(0, 0, 0), B
    End Sub
    Is these codes of the Block cipher encryptor for text-to-image algorithm (B-TTIE algorithm) by Abusukhon 2013? If not, can someone help to make it the same with B-TTIE algorithm? Thank you vey much!

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    12,059
    Rep Power
    25

    Default Re: The text-to-image algorithm

    That's not Java. What is it?

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    14,423
    Blog Entries
    7
    Rep Power
    27

    Default Re: The text-to-image algorithm

    Cool! Another 'guess the language' thread; my guess: given the names of some of the constants/variables (they start with 'vb'), it's probably Visual Basic. b.t.w. the code is lacking the 'Encode' and 'Decode' functions/procedures and it is badly indented. Also b.t.w. this is a Java forum.

    kind regards,

    Jos
    Build a wall around Donald Trump; I'll pay for it.

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    12,059
    Rep Power
    25

    Default Re: The text-to-image algorithm

    Cross posted on another Java forum and moved to their 'Other Programming Languages' section:
    B-TTIE algorithm

    If the OP doesn't come back, I vote to trash this thread in a few hours. Any objections?

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  5. #5
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    14,423
    Blog Entries
    7
    Rep Power
    27

    Default Re: The text-to-image algorithm

    Quote Originally Posted by DarrylBurke View Post
    Cross posted on another Java forum and moved to their 'Other Programming Languages' section:
    B-TTIE algorithm

    If the OP doesn't come back, I vote to trash this thread in a few hours. Any objections?

    db
    That's fine with me; you do it; I don't want to get dirty today ;-)

    kind regards,

    Jos
    Build a wall around Donald Trump; I'll pay for it.

Similar Threads

  1. How to get text from an image
    By chandu21061987 in forum New To Java
    Replies: 1
    Last Post: 02-10-2014, 09:45 AM
  2. Replies: 4
    Last Post: 08-09-2012, 06:18 PM
  3. anyone have algorithm for text compare?
    By franco in forum New To Java
    Replies: 8
    Last Post: 08-08-2011, 04:32 PM
  4. Replies: 1
    Last Post: 07-28-2011, 08:48 AM
  5. algorithm to cut an object from an image
    By TamTam in forum Java 2D
    Replies: 2
    Last Post: 02-27-2009, 10:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •