Results 1 to 3 of 3

Thread: text on image

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2007
    Posts
    261

    text on image

    hi all i need some help with what im working on

    i want to put some text in the middle of a picture and make the picture transparent by about 50%

    i would like the text to be about 24 in size and bold

    i have got this to now

    Code:
    $iOut = imagecreatetruecolor ("1268","202") ; 
    $text_color = imagecolorallocate($iOut, 233, 14, 91);
    imagestring($iOut, 1000, 500, 100,  'A Simple Text String monkey', $text_color);
    imagepng($iOut,$_SERVER["DOCUMENT_ROOT"].'/php/videos/hide/header2.jpg');
    imagedestroy($iOut);
    programming pc: laptop. running xp pro and vb.net..
    media centre xp pc: dual core 6000,4gb memory, 1tb harddrive
    mainserver: server 2008, 8gb memory, amd e-350 dual core, 6tb harddrive and local web host
    atomvault 1: server 2008, atom 330 with 4 gb memory, 35TB hardrive space for videos and music..
    backup pc : xp, 4gb, atom 330, 10tb harddrive(web, pictures, music, databases)
    2 x video backup: atom 330, 2gb, 18tb harddrive
    everything on remote login..
    check out my builds http://AtomVaults.yolasite.com

    learning vb.net and php + mysql - got most of the basics now.

    I WISH THERE WAS MORE TIME IN THE DAY

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2007
    Posts
    261

    Re: text on image

    hi
    managed to sort the pictures transparency

    stuck with puttinf txt on the image. i have this ut cant seem to change font size

    Code:
    $iOut=ImageCreateFrompng($_SERVER["DOCUMENT_ROOT"].'/php/videos/hide/tempheader.png');
    $text_color = imagecolorallocate($iOut, 233, 14, 91);
    imagestring($iOut, 22, 500, 100,  'A Simple Text String, $text_color);
    imagejpeg($iOut,$_SERVER["DOCUMENT_ROOT"].'/php/videos/hide/header2.jpg');
    imagedestroy($iOut);
    programming pc: laptop. running xp pro and vb.net..
    media centre xp pc: dual core 6000,4gb memory, 1tb harddrive
    mainserver: server 2008, 8gb memory, amd e-350 dual core, 6tb harddrive and local web host
    atomvault 1: server 2008, atom 330 with 4 gb memory, 35TB hardrive space for videos and music..
    backup pc : xp, 4gb, atom 330, 10tb harddrive(web, pictures, music, databases)
    2 x video backup: atom 330, 2gb, 18tb harddrive
    everything on remote login..
    check out my builds http://AtomVaults.yolasite.com

    learning vb.net and php + mysql - got most of the basics now.

    I WISH THERE WAS MORE TIME IN THE DAY

  3. #3
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,929

    Re: text on image

    Thread moved from the 'CodeBank - PHP' forum (which is for you to post working code examples, not questions) to the 'PHP' forum

Posting Permissions

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



Click Here to Expand Forum to Full Width