Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Join Date
    May 2005
    Location
    /etc/passwd
    Posts
    19,110
    Tokens
    1,139

    Latest Awards:

    Default PHP GD Image help

    Hello,

    I want to create an image in Photoshop and then have a PHP script output data to it, kinda like the Last.FM signatures.

    So I have some code, and if I put "echo $text;" into a file it will echo the output (a countdown). How would I make it so that this is put onto a specific place on an image?

    Like Tom743's (thanks for the code by the way LOL)
    Thanks
    Last edited by Recursion; 13-11-2008 at 08:14 PM.
    Quote Originally Posted by Chippiewill View Post
    e-rebel forum moderator
    :8

  2. #2
    Join Date
    Nov 2007
    Posts
    1,253
    Tokens
    150

    Latest Awards:

    Default

    Its alot more than just echoing some text onto an image, you have to setup the image first then assign colours etc.... ( gd of course).

    I will edit with a very basic script to make a signature using a peice of text from a $_GET request.

    So hold up


    www.fragme.co = a project.

  3. #3
    Join Date
    May 2005
    Location
    /etc/passwd
    Posts
    19,110
    Tokens
    1,139

    Latest Awards:

    Default

    I knew it was more complex, im just clueless with GD and PHP in general, I can edit scripts but not create them
    Quote Originally Posted by Chippiewill View Post
    e-rebel forum moderator
    :8

  4. #4
    Join Date
    Dec 2006
    Posts
    3,970
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by ***** View Post
    Hello,

    I want to create an image in Photoshop and then have a PHP script output data to it, kinda like the Last.FM signatures.

    So I have some code, and if I put "echo $text;" into a file it will echo the output (a countdown). How would I make it so that this is put onto a specific place on an image?

    Like Tom743's (thanks for the code by the way LOL)
    Thanks
    If you are trying to input it into a GD image you wont use echo text.

    PHP Code:
    header("Content-type: image/gif");
    $image imagecreatefromgif"yourbackgroundimage.gif" );
    $colour imagecolorallocate($image000); //RGB colour, used for the text color
    imagestring$image52020$text$colour ); //the image background, font size, width, height, text to echo, colour
    imagegif$image );
    imagedestroy$image ); 
    Lets set the stage on fire, and hollywood will be jealous.

  5. #5
    Join Date
    May 2005
    Location
    /etc/passwd
    Posts
    19,110
    Tokens
    1,139

    Latest Awards:

    Default

    Aha thanks

    +REP

    EDIT: Gotta spread
    Quote Originally Posted by Chippiewill View Post
    e-rebel forum moderator
    :8

  6. #6
    Join Date
    Nov 2007
    Posts
    1,253
    Tokens
    150

    Latest Awards:

    Default

    Note how bad that script is. It limits you in terms of fonts... you will always be stuck with that shocking system font.

    Either way it will do what you want, just look into more tuts online which will cover more aspects.
    Last edited by Source; 13-11-2008 at 08:25 PM.


    www.fragme.co = a project.

  7. #7
    Join Date
    May 2005
    Location
    /etc/passwd
    Posts
    19,110
    Tokens
    1,139

    Latest Awards:

    Default

    Ill steal the font code from the Last.FM code.
    Quote Originally Posted by Chippiewill View Post
    e-rebel forum moderator
    :8

  8. #8
    Join Date
    Dec 2006
    Posts
    3,970
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Source View Post
    Note how bad that script is. It limits you in terms of fonts... you will always be stuck with that shocking system font.
    I have had to do it like that for my script because awardspace doesn't allow fonts been uploaded
    Lets set the stage on fire, and hollywood will be jealous.

  9. #9
    Join Date
    Nov 2007
    Posts
    1,253
    Tokens
    150

    Latest Awards:

    Default

    Fair enough, but maybe then get a better host? (not free)


    www.fragme.co = a project.

  10. #10
    Join Date
    May 2005
    Location
    /etc/passwd
    Posts
    19,110
    Tokens
    1,139

    Latest Awards:

    Default

    Thanks guys

    Just waiting for Photoshop to finish reinstalling (yawn)

    I would +REP but I have to spread for both of you
    Quote Originally Posted by Chippiewill View Post
    e-rebel forum moderator
    :8

Page 1 of 2 12 LastLast

Posting Permissions

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