Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder Rappa's Avatar
    Join Date
    Nov 2005
    Location
    LI
    Posts
    356
    Thanks
    21
    Thanked 9 Times in 9 Posts

    Question about images

    I was wondering if there was a way to take an image with html, such as

    <img src='img.jpg' />

    and use php within the same page to take text from a text box and place it on the image, than save it as a new image.

    I hope thats not too confusing.

    so, user enters text in text box, hits enter, and it writes it to the image using coordinates, then saves the image to a folder or something.

    Thanks for anyone who can help.

    - Anthony

  • #2
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    Sure can, although it requires the GD Image library.

    Check this out: http://scriptplayground.com/tutorial...Text-On-Image/

    Dan
    PHP Tip: If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.

    Don't forget to save everyone time and mark your thread as Resolved :)

    "Also note that it is your responsibility to die() if necessary."

    DON'T USE THE MYSQL_ EXTENSION

  • #3
    Regular Coder
    Join Date
    Dec 2009
    Location
    UK
    Posts
    495
    Thanks
    0
    Thanked 58 Times in 58 Posts
    You will also need to get the image file, so if you don't know it before hand you'll have to either upload the image from the user or get the url to the file and download it, then apply the text
    My site: JayGilford.com
    Resources:
    PHP Pagination Class | Getting all page links | Handling PHP Errors properly
    If you like a users help, show your appreciation with the rep and thanks buttons :)

  • #4
    Regular Coder Rappa's Avatar
    Join Date
    Nov 2005
    Location
    LI
    Posts
    356
    Thanks
    21
    Thanked 9 Times in 9 Posts
    What if I have the image displayed in html? Will this not work?

    If not, how?


    FWI: this is not for school or any sort of homework. I am developing this for my non profit organization.


  •  

    Posting Permissions

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