[PHP] gd lib - createimage problem

Dieses Thema im Forum "Webentwicklung" wurde erstellt von litux, 27. Januar 2009 .

Status des Themas:
Es sind keine weiteren Antworten möglich.
  1. 27. Januar 2009
    gd lib - createimage problem

    hi leute.
    das thema "wasserzeichen auf ein bild" setzen ist ja bekannt.
    das problem bei mir, ich möchte eine bild erstellen wo der hintergrund transpart ist.
    das hier hab ich gemacht bis jetzt:

    header ('Content-type: image/png');
    $im = imagecreate(120, 20) or die('Cannot Initialize new GD image stream');
    $text_color = imagecolorallocate($im, 0, 0, 0);
    $burn="www.domain.de";
    imagestring($im, 20, 5, 5, $burn, $text_color);
    imagepng($im,"erzeugt.png");

    also ich möchte dass "www.domain.de" schwarz geschrieben wird, aber der hintergrund davon soll halt transparent sein.
    kann mir da jemand helfen?
    danke
     
  2. 27. Januar 2009
    AW: gd lib - createimage problem

    PHP:
    header  ( 'Content-type: image/png' );
    $im  imagecreate ( 120 20 ) or die( 'Cannot Initialize new GD image stream' );
    imagecolorallocate ( $im 255 255 255 );  //background
    $text_color  imagecolorallocate ( $im 0 0 0 );
    $burn = "www.domain.de" ;
    imagestring ( $im 20 5 5 $burn $text_color );
    imagepng ( $im );
    PHP: imagecreate - Manual

    einfach immer wieder im php-manual blättern hilft.
     
  3. Video Script

    Videos zum Themenbereich

    * gefundene Videos auf YouTube, anhand der Überschrift.