Insert text within an image

Discussion in 'PHP' started by sykes3d, Dec 27, 2012.

  1. #1
    How I insert all that was entered in a form inside a custom image and save this image in data base.

    Is it possible?
     
    sykes3d, Dec 27, 2012 IP
  2. ogah

    ogah Member

    Messages:
    60
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #2
    possible. but you must calculate how many chars the text and size of image. so your text can fit in image
     
    ogah, Dec 27, 2012 IP
  3. jerrymark

    jerrymark Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hi,

    If you want to insert some text into the image than you can use image editing software, you can swap the colors of your text and background by using the menu commands Layer, Colors, then Invert.
     
    jerrymark, Dec 27, 2012 IP
  4. ogah

    ogah Member

    Messages:
    60
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #4
    right. but may be he want make web image creator, he give the background image than visitor can save his image with text that submited from his form
     
    ogah, Dec 28, 2012 IP
  5. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #5
    Never save an image in the database. Save the image as a file, and save the filename in the database.

    As far as putting text on an image, there are libraries to do that. Which one you need depends on the code already on the site and your ability to write the code to add the text to the image. There's no script you can just drop into your site.
     
    Rukbat, Dec 30, 2012 IP