SAludos tengo un problema super bueno ahora no se como solucionarlo si alguien sabe uf seria genial.
tengo un documento que es este
<?php
function text_imag($foto,$tex,$anch,$alt){
$nomb_imag = $foto;
$aca = explode("/",$nomb_imag);
$oca = "tumb".$aca[1];
$texto = $tex;
$imag = ImageCreateFromJPEG($foto);
//Header("Content-typ: image/jpeg");
$width_image = ImageSX($imag);
$height_image = ImageSY($imag);
$ancho = $anch;
$alto = $alt;
$imag_destino = imagecreatetruecolor($ancho,$alto);
imagecopyresized($imag_destino, $imag ,0 ,0 ,0 , 0, $ancho, $alto, $width_image, $height_image);
$nomb_imag = $aca[0].$oca;
$nombre_destino = $nomb_imag;
ImageJPEG($imag_destino,$nombre_destino,75);
$width_image_wo_margins = $ancho - (2 * 1);
$height_image_wo_margins = $alto - (2 * 1);
$font_size = 33;
do
{
$font_size--;
$bbox=imagettfbbox ($font_size, 0, "comicbd.ttf", $button_text);
$right_text = $bbox[2];
$left_text = $bbox[0];
$width_text = $right_text - $left_text;
$height_text = abs($bbox[7] - $bbox[1]);
} while ( $font_size>8 &&
( $height_text>$height_image_wo_margins ||
$width_text>$width_image_wo_margins )
);
if ( $height_text>$height_image_wo_margins ||
$width_text>$width_image_wo_margins )
{
echo "El texto indicado no encajará en el botón.<BR>";
}
else
{
$text_x = $anch/2.0 - $width_text/2.0;
$text_y = $alt/2.0 - $height_text/2.0 ;
if ($left_text < 0)
$text_x += abs($left_text);
$above_line_text = abs($bbox[7]);
$text_y += $above_line_text;
$text_y -= 2;
$blanco = ImageColorAllocate ($imag_destino, 255, 0, 0);
ImageTTFText ($imag_destino, 18, 0, 25, 75, $blanco, "comicbd.ttf", $texto);
ImageJPEG($imag_destino,'',75);
return "fotos/".$imag_destino;
}
ImageDestoy($imag_destino);
}
-- llamada al objeto
$galeryas = "008_HM.jpg";
$direc = "fotos/$galeryas";
$anchito = (400)/2;
$altito = (300)/2;
text_imag($direc,"Vendida",$anchito,$altito);
hasta aca funciona super bien este crio lo hace super bien, cual es el problema?
consiste en que yo quiero poner la llamada de funcion dentro de una tabla diseñada pero me arroja un error uf y no se como rescatar esta imagen que se genera en una página por si sola pero cuando pongo html al lado me queda la escoba si alguien tiene alguna solucion bienvenido sea sino bueno gracias de todas meneras aca dejo el codigo que funciona bastante bien por si solo en una pagina sola pero anidado nooooo