Results 1 to 3 of 3

Thread: text on image

Hybrid View

  1. #1
    Addicted Member
    Join Date
    Jun 07
    Posts
    251

    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: athlon 3000 with 1gb memmory and 500g harddrive. running xp pro and vb6..
    media centre xp pc: 3gb memory,athlon 3000+, test pc..
    media centre xp pc: dual core 6000,4gb memory, 1tb harddrive
    minivault: server 2008 with remote login, 2gb memory, atom 330 dual core, 6tb harddrive and local web host
    atomvault 1: server 2008, atom 330 with 4 gb memory, 21TB hardrive space. backing up and storage centre..
    check out my builds http://AtomVaults.yolasite.com

    moving from vb6 to vb.net 2010
    learning vb.net and php + mysql

    I WISH THERE WAS MORE TIME IN THE DAY

  2. #2
    Addicted Member
    Join Date
    Jun 07
    Posts
    251

    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: athlon 3000 with 1gb memmory and 500g harddrive. running xp pro and vb6..
    media centre xp pc: 3gb memory,athlon 3000+, test pc..
    media centre xp pc: dual core 6000,4gb memory, 1tb harddrive
    minivault: server 2008 with remote login, 2gb memory, atom 330 dual core, 6tb harddrive and local web host
    atomvault 1: server 2008, atom 330 with 4 gb memory, 21TB hardrive space. backing up and storage centre..
    check out my builds http://AtomVaults.yolasite.com

    moving from vb6 to vb.net 2010
    learning vb.net and php + mysql

    I WISH THERE WAS MORE TIME IN THE DAY

  3. #3
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 02
    Location
    Bristol, UK
    Posts
    35,562

    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
  •