Hi Everyone, I am trying to write text to a image and I would like to save that image as a new file with the text in place.
I have been doing some google'ing and testing but im getting confused a wee bit.
The two scripts I have found both pretty much do the same thing as they write text to any pre-determined image.
But what they dont give you is how to create a new image and then save it for later useage.
The two script I am working with are as follows.
header("Content-type: image/jpeg"); $imgPath = 'image.jpg'; $image = imagecreatefromjpeg($imgPath); $color = imagecolorallocate($image, 255, 255, 255); $string = "http://test.net"; $fontSize = 3; $x = 115; $y = 185; imagestring($image, $fontSize, $x, $y, $string, $color); imagejpeg($image);
Now, When ever I put this code on my website inside the <head>
The page doesnt load fully, Im thinking it must have something to do with the header ("content-type")
Any help would be much appreciated