Hi Guys,
I am trying to nut this one out. I have a pretty basic dynamic image script
header("Content-type: image/jpeg");
if($_POST["dept"]=='0'){
print("Please select a department");
echo "<br>";
echo "<a href='logo.html'>Back</a>";
}
else{
$department = $_POST["dept"];
$text = $_POST["logoText"];
$img = imagecreatefromjpeg("departments/$department");
$grey = imagecolorallocate($img, 50, 50, 50);
imageline($img, 0, 0, 0, 100, $grey);
$white = imagecolorallocate($img, 255, 255, 255);
$black = imagecolorallocate($img, 0, 0, 0);
$blue = imagecolorallocate($img, 26, 53, 106);
imagettftext($img, 12, 0, 8, 65, $blue, "fonts/Geneva.dfont", $text);
imagejpeg($img,"", 100);
imagedestroy($img);
}
Anyways I think I have everything covered. But when I produce the image and right click to save it...
IT SAVES AS A BMP!!!! I was under the impression that if you stipulated the correct header. i.e image/jpeg. Then everything would be fine.
This script saves as a jpg on a mac.