Re: IMAGENES CON TEXTO

From: Date: Wed, 21 Nov 2001 15:38:45 +0000
Subject: Re: IMAGENES CON TEXTO
Groups: php.general.es 
Request: Send a blank email to general-es+get-15858@lists.php.net to get a copy of this message
Hola : tienes que usar la funcion "ImageString()" . hay te va un ejemplo function CreaGraf(){ $Width = 500; $Height = 500; $im = ImageCreate($Width,$Height); $white = ImageColorAllocate($im,255,255,255); $blue = ImageColorAllocate($im,0,0,255); $file = "file.png" # "imagen dada" $file2 = "file2.png"; # imagen final $img = ImageCreateFromPng($file); $Swidth = ImageSX($img); $Sheight = ImageSY($img); ImageCopyResized ($im,$img,0,0,0,0,$Swidth,$Sheight,$Swidth,$Sheight); ImageString($im,2,$Swidth/2,$Sheight + 10,"Mi primer PNG",$blue); ImagePng($im,$file2); ImageDestroy($im); } Nota : Los acentos fueron omitidos. Saludos Ing. Ernesto Higa T. Centro de Gestion de Redes de Clientes Telefonica Data Peru > > Hola listeros. > > Nunca use nada de imágenes con PHP, y me surgio la necesidad de insertar > un texto dinamicamente en una imagen dada. > > Me pueden guiar de cómo hacerlo ? > > El script PHP estaría bajo Linux y tengo las librerias GD compiladas. > > Desde ya muchas gracias. > > ---------------------------------------------- > .--. > |o_o | > |:_/ | > // \ \ > (| | ) > /'\_ _/`\ > \___)=(___/ @riel > > > > >

« previous php.general.es (#15858) next »