Im getting a weird error everytime my php script edits a picture
but if I open the image it edited its fine
here is my code
<?
Header("Content-Type: image/jpeg");
if (!isset($_REQUEST["string"]) || $_REQUEST["string"] <= "") {
$string = "Hello and Welcome!";
} else {
$string = $_REQUEST["string"];
}
$id = ImageCreateFromJpeg("test.jpg");
$black = ImageColorAllocate($id, 0, 0, 0);
ImageString($id, 1, 15, 20, $string, $black);
ImageJpeg($id,"test2.jpg");
ImageDestroy($id);
?>
any ideas?