Les describiré mi problema, de forma básica para ver si me pueden ayudar:
Tengo una funcion que genera thumbinails, que funciona exelente:
Código PHP:
function tn_create($image,$max_width,$max_height)
{
//Tomo las dimensiones de la imagen original
$size = GetImageSize($image);
$width = $size[0];
$height = $size[1];
//Calculo el ratio
$x_ratio = $max_width / $width;
$y_ratio = $max_height / $height;
//Si la imagen original supera el tamaño del tn, calculo $tn_width y $tn_eight--
if ( ($width <= $max_width) && ($height <= $max_height) )
{
$tn_width = $width;
$tn_height = $height;
}
else if (($x_ratio * $height) < $max_height)
{
$tn_height = ceil($x_ratio * $height);
$tn_width = $max_width;
}
else
{
$tn_width = ceil($y_ratio * $width);
$tn_height = $max_height;
}
//------------------------------------------------------------------------
$src = ImageCreateFromJpeg($image);//Crea una imagen temporal en el servidor
$dst = ImageCreate($tn_width,$tn_height); //Crea una imagen en blanco del tamaño del tn
//Copio la imagen temporal dentro de la imagen destino, adaptando el tamaño
ImageCopyResized($dst, $src, 0, 0, 0, 0,$tn_width,$tn_height,$width,$height);
//Creo directamente una salida para el navegador
header('Content-type: image/jpeg');
ImageJpeg($dst, null, -1);
//Destruyo las imagenes temporales
ImageDestroy($src);
ImageDestroy($dst);
}
por ejemplo:
tn_create('imagen.jpg',50,50);
y joya me devuelve un tn (thumbinail) de la imagen....
El problema es que yo antes del thumbinail, tengo que poner texto
y si ejecuto lo siguiente el tn no me lo muestra:
Código PHP:
echo "hola mundo <BR>";
tn_create('imagen.jpg',50,50);
Pero no sé como solucionarlo..
¿Como genero un tn en forma dinámica junto con texto en la misma pantalla ?
Se entiende mi duda?
AYUDA please.......