#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    3
    Rep Power
    0

    GD Library Wrapper


    I am looking at using the GD library on a project i am working on but the problem is that it is on an ASP classic server so i have downloaded the GD Wrapper and i am just looking for some help towards completing what i need to do.

    In a nutshell i am trying to customize a picture with some text so i need to know how to update an image with some text on the fly so that i don't have to refresh the page every time the text is changed, i will be using a standard text field for the user to type in the text they need and then print it onto an image as the customer is typing.

    Any help or pointers in whether this would be possible would be appreciated.

    thanks in advance for your help
    Brad
  2. #2
  3. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Location
    Pennsylvania, USA
    Posts
    10,908
    Rep Power
    6352
    What language are you doing this in? You've posted in the PHP forum
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    3
    Rep Power
    0
    Originally Posted by ManiacDan
    What language are you doing this in? You've posted in the PHP forum
    I am writing this in asp and I understand that this is a PHP forum but because it is in reference to the GD library and whether i can do what i need to with this library I thought this might be be the best place to ask the question.

    Thanks
  6. #4
  7. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,316
    Rep Power
    7170
    In a nutshell i am trying to customize a picture with some text so i need to know how to update an image with some text on the fly so that i don't have to refresh the page every time the text is changed, i will be using a standard text field for the user to type in the text they need and then print it onto an image as the customer is typing.
    You won't need to refresh the whole page, but you will need to refresh the whole image. You can't just update the text part of it. You'll have to get some JavaScript involved as it will be necessary to trigger a new HTTP request to the server every time the image is changed, so that a new image can be fetched with the updated text.

    It seems like it would be more efficient to just overlay text on top of a static background image using CSS.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    3
    Rep Power
    0
    I was considering the option of a css text overlay but i also need to specify a possible curve in the text line as the images i will be placing the text over may have a curved perspective and i want the text to match which is why i was considering the GD library.

    Can you confirm that i will be able to transform the text using the library i.e. create an arch, or change the perspective to look as though the text is getting smaller. I also want to be able to save to image to add to an email later so that the customer can see the finished product.

    thank you for your advice.
    Brad
  10. #6
  11. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Location
    Pennsylvania, USA
    Posts
    10,908
    Rep Power
    6352
    It's not like photoshop, you can't just press an arch button. you'll probably have to do the math by hand.
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.
  12. #7
  13. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,959
    Rep Power
    1014
    Hi,

    I'm not sure if the GD library is capable of doing this. If it's possible for you to install the excellent ImageMagick on the server, then you should definitely use it instead of gdlib. It can do everything you'll every need and has a high quality output.

    Some examples:
    Font Effects
    Distorting
  14. #8
  15. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,316
    Rep Power
    7170
    Can you confirm that i will be able to transform the text using the library i.e. create an arch, or change the perspective to look as though the text is getting smaller.
    As far as I know GD doesn't have the ability to do that.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around

IMN logo majestic logo threadwatch logo seochat tools logo