$imagen="25JC.jpg";
$altoancho=getimagesize($imagen);
/*echo "Ancho: ".$altoancho[0];
echo "Alto: ".$altoancho[1];*/
$texto="juan eduardo martinez carrillo";
$total=strlen($texto);
$ancho=$altoancho[0]+20;
$alto=$altoancho[0]+20;
$im = imagecreate($altoancho[0]+20,$altoancho[1]+20)
or die("Cannot Initialize new GD image stream");
$color_fondo = imagecolorallocate($im, 255,255,255);
$color_texto = imagecolorallocate($im, 0, 0, 0);
$paleta=array(imagecolorallocate($im, 0, 0, 0),imagecolorallocate($im, 216, 245, 255));
for($i=0;$i<imagesx($im);$i++)
{
}
//imagechar($im, 1, 0, 0, $texto, $color_texto);
$fuente="fonts/arial.ttf";
$texto="juan eduardo marinez carrillo";
$arr=array($altoancho[0],$altoancho[1],$altoancho[0],$altoancho[1]);
$grad=array(0,90,360,270);
$x=array(0,$altoancho[0],$altoancho[0],0);
$y=array(0,0,$altoancho[1],$altoancho[1]);
$total=strlen($texto);
$impresion="";
$b=0;
$c=0;
$bandera=imagesx($im)-100;
/*for($i=0;$i<imagesx($im);$i++)
{
for($a=0;$a<imagesy($im);$a++)
{
imagesetpixel ( $im , $i , $a ,$paleta[$i%2]);
}
}*/
for($i=0;$i<imagesx($im);$i++)
{
if($i<$bandera)
{
if($b<$total)
{
$impresion.=$texto[$b];
$b++;
}
else{$b=0;$impresion.=" ";}
}
else
{
echo $i."==".$bandera."<br/>";
}
}
imagefttext($im,10,0,0,10,$color_texto,$fuente,$im presion);
//imagestring($im, 1, 5, 5, "A Simple Text String", $color_texto);
imagepng($im,"borde.png");
imagedestroy($im);
en si quiero hacer algo como una credencial donde valla la imagen de la persona el borde este inscrito su nombre
gracias por su ayuda
