Creando imagenes PNG con PHP
| Categorías General, internet, Personal, PHP, Programacion, Tecnologia | Fecha 14-10-2009 | Comentario 0
Number of View: 865
De esta manera puedes crear una imagen a partir de otra y hacer ciertas modificaciones sobre ella.
1 2 3 4 5 6 7 8 9 10 11 12 | < ?php
header("Content-type: image/png");
$string = $_GET['text'];
$im = imagecreatefrompng("images/button1.png");
$orange = imagecolorallocate($im, 220, 210, 60);
$px = (imagesx($im) - 7.5 * strlen($string)) / 2;
imagestring($im, 3, $px, 9, $string, $orange);
imagepng($im);
imagedestroy($im);
?> |