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 2 of 2 FirstFirst 12
Results 11 to 16 of 16
  1. #11
    Join Date
    May 2005
    Location
    /etc/passwd
    Posts
    19,110
    Tokens
    1,139

    Latest Awards:

    Default

    Sorry for double post.

    I have
    PHP Code:
    header("Content-type: image/gif");
    $image imagecreatefromgif"christmas.gif" );
    $font 'comic.ttf'// added the font to use (its in same directory) 
    $colour imagecolorallocate($image0119180); //RGB colour, used for the text color
    imagestring$image508020$text$colour ); //the image background, font size, width, height, text to echo, colour
    imagegif$image );
    imagedestroy$image ); 
    But it doesn't seem to be displaying the text in the right font (comic.ttf) on the image...
    Quote Originally Posted by Chippiewill View Post
    e-rebel forum moderator
    :8

  2. #12
    Join Date
    Mar 2008
    Posts
    5,108
    Tokens
    3,780

    Latest Awards:

    Default

    Yeah, because imagestring doesn't have a font option You're really not plugging $font in anywhere..

    Use imagettftext() instead of imagestring()

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

    Latest Awards:

    Default

    Code:
    [13-Nov-2008 22:07:02] PHP Warning:  Wrong parameter count for imagettftext() in /home/prach/public_html/xmas/index.php on line 77
    Line 77:
    PHP Code:
    imagettftext$image508020$text$colour ); //the image background, font size, width, height, text to echo, colour 
    Quote Originally Posted by Chippiewill View Post
    e-rebel forum moderator
    :8

  4. #14
    Join Date
    Jan 2006
    Location
    Kent
    Posts
    987
    Tokens
    0

    Default

    You might want to look at this, http://uk2.php.net/manual/en/function.imagettftext.php , you should then be able to determine what parameters need to be set
    This is our situation and we're happy to be here,
    I wouldn't change this place for anything.


  5. #15
    Join Date
    Mar 2008
    Posts
    5,108
    Tokens
    3,780

    Latest Awards:

    Default

    See, look at the PHP.net documentation.. it tells you what you need to know: http://us3.php.net/imagettftext

    imagettftext ( resource $image , float $size , float $angle , int $x , int $y , int $color , string $fontfile , string $text )

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

    Latest Awards:

    Default

    Thanks guys, got it working using the PHP pages (My signature woop woop LOL)

    +REP'd everyone I can.
    Quote Originally Posted by Chippiewill View Post
    e-rebel forum moderator
    :8

Page 2 of 2 FirstFirst 12

Posting Permissions

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