Hola gente tengo un drama que quisiera si me pueden dar una mano tengo el siguiente codigo:
<?php
header('Content-type: image/jpeg');
$myimage = resizeImage('01.jpg', '150', '120');
print $myimage;
function resizeImage($filename, $newwidth, $newheight){
list($width, $height) = getimagesize($filename);
if($width > $height && $newheight < $height){
$newheight = $height / ($width / $newwidth);
} else if ($width < $height && $newwidth < $width) {
$newwidth = $width / ($height / $newheight);
} else {
$newwidth = $width;
$newheight = $height;
}
$thumb = imagecreatetruecolor($newwidth, $newheight);
$source = imagecreatefromjpeg($filename);
imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
return imagejpeg($thumb);
}
?>
Bueno este codigo anda de 10 el tema es que anda bien cuando esta solo, osea cuando le pongo un por ejemplo:
print("hola"); o un echo"hola"; me tira error en el "headers already sent by..."
como puedo solucionar esto para tener obvio foto con texto, saludos a todos y gracias