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 6 of 6
  1. #1
    Regular Coder
    Join Date
    Jan 2003
    Posts
    400
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How could I do a text-to-image sort of thing with php???

    i just saw something that beetle said about a text-to-image thing using php in a different forum and I was wondering how I would b able 2 do that. Thanks for any hlp!

  • #2
    Senior Coder missing-score's Avatar
    Join Date
    Jan 2003
    Location
    UK
    Posts
    2,194
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You will have to use the GD functions. I don't know much about these myself, but you could look at www.php.net.

    I know Okki (I hope it's spelt like that) is very good with gd.

  • #3
    Regular Coder
    Join Date
    Jan 2003
    Posts
    400
    Thanks
    0
    Thanked 0 Times in 0 Posts
    what is gd?

  • #4
    Senior Coder missing-score's Avatar
    Join Date
    Jan 2003
    Location
    UK
    Posts
    2,194
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Sorry, My knowledge goes as far as knowing it is called gd

    I should look in to it more...

  • #5
    New Coder
    Join Date
    Feb 2003
    Location
    Brazil
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    GD is the image manipulation php module. U shoulddownload the php manual (about 16 megs pdf file) and take a look. The gd functions are not hard to use. Good luck!

  • #6
    Regular Coder
    Join Date
    Jun 2002
    Location
    UK
    Posts
    577
    Thanks
    0
    Thanked 0 Times in 0 Posts
    GD (generally bundled image libraries available from boutell.com) handles writing text over images quite competently, especially in newer builds - anti-aliases on truecolour ping files since 2.0.5 or so.

    Your GD build (if you have it) should be compiled with the truetype libraries available from freetype.org - else you will be restricted to using system fonts and imagestring() which just doesn't quite have the ooompppfh

    [rant mode on]
    the GD libraries process all image rendering by converting the image to a format called .gd (or .gd2 in newer builds)
    which is quite resource hungry.
    therefore - dynamically creating images at every page load is something to avoid like the proverbial. If you can, preprocess any images and save a server copy somewhere and just link to that.
    failing that - perhaps preprocess the background image and save it as .gd2 or .gd which, though larger filesize than most public formats, will speed up the scripts and lower the resources used.
    [rant mode off]

    if you have tested your php build and have GD compiled
    (either
    phpinfo(); or
    var_dump(gd_info());
    )
    and want a test script, just ask.
    Ökii - formerly pootergeist
    teckis - take your time and it'll save you time.


  •  

    Posting Permissions

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