Hello,
I am using the following code to put some text on a photo. The code is working great, but still have some errors reported from some users that told me that they can't see the photo.... no X like the photo is missing or anything else... just blank white photo:
<?
$text = "My Yamaha";
$imagine = "images/yamaha.jpg";
$font = "antiqua.ttf";
$ext=substr($imagine,-4);
$ext=strtolower($ext);
if (file_exists($imagine)){
if($ext==".jpg" || $ext=="jpeg"){
$im=@imagecreatefromjpeg("$imagine");
$culoare=imagecolorallocate($im, 0xFF, 0xFF, 0xFF);
imagettftext($im, 10, 0, 5, 15, $culoare, $font, $text);
$culoare=imagecolorallocate($im, 0xFF, 0x00, 0x00);
imagettftext($im, 10, 0, 6, 15, $culoare, $font, $text);
header("Content-type: image/jpeg");
imagejpeg($im);
imagedestroy($im);
}
}
?>
Any sugestion on this one???