Ver Mensaje Individual
  #4 (permalink)  
Antiguo 25/05/2006, 12:12
Avatar de LedideR
LedideR
 
Fecha de Ingreso: noviembre-2004
Ubicación: Temuco, Chile
Mensajes: 39
Antigüedad: 19 años, 5 meses
Puntos: 1
Claro, no hay problema... pero me gustaría que alguien me diga que le puede faltar al código...

Código PHP:
<?php 

// NOMBRE DE ARCHIVO: thumb.php

// IMAGEN DE FONDO
$fuente imagecreatefromjpeg($_GET[img]);
$imgAncho imagesx($fuente);
$imgAlto imagesy($fuente);

// SEGUNDA IMAGEN, ESTA VA ENCIMA DE LA OTRA
$fuente2 imagecreatefrompng($_GET[img2]);
$imgAncho2 imagesx($fuente2);
$imgAlto2 imagesy($fuente2);

// SE CREA LA IMAGEN DEL TAMAÑO ESPECIFICADO
$imagen ImageCreateTrueColor($_GET[ancho],$_GET[alto]);

// SE SUPERPONEN LAS IMAGENES
ImageCopyResized($imagen,$fuente,0,0,0,0,$_GET[ancho],$_GET[alto],$imgAncho,$imgAlto);
ImageCopyResized($imagen,$fuente2,0,0,0,0,$_GET[ancho],$_GET[alto],$imgAncho2,$imgAlto2);

// SE GENERA LA IMAGEN
Header("Content-type: image/png");
imagePng($imagen);

?>
Las imágenes se obtienen especificandolas en la ruta... por ejemplo:
Código:
http://www.misitio.com/thumb.php?img=carpeta/fondo.jpg&img2=carpeta/logo.png&ancho=300&alto=300
Esto haría que la imagen logo.png quede encima de la imagen fondo.jpg y la imagen creada sea de 300x300
__________________
-=| L\€/O |=-

Última edición por LedideR; 28/05/2006 a las 14:25