I actually made the code work and it shows the text i want on the image i want but i have 2 problems:
1. When i see the picture and try to save it, the file name that it shows to save is the name of the PHP file i use .png and i would like to change the file name to something else and was not able to do so. I did try replace the imagepng($im); with imagepng($im, 'blabla.png'); and it didnt work.
Question
V-Tech
This is the code i have -
header("Content-type: image/png"); $string = "test"; $im = imagecreatefrompng("images/test.png"); $orange = imagecolorallocate($im, 255, 255, 255); $font = './images/ARIALBD.TTF'; imagettftext($im, 12, 0, 10, 36, $orange, $font, $string); imagesavealpha($im, true); imagepng($im); imagedestroy($im);I actually made the code work and it shows the text i want on the image i want but i have 2 problems:
1. When i see the picture and try to save it, the file name that it shows to save is the name of the PHP file i use .png and i would like to change the file name to something else and was not able to do so. I did try replace the imagepng($im); with imagepng($im, 'blabla.png'); and it didnt work.
2. How do i add effects to the text in here?
Thanks alot for the help.
Link to comment
Share on other sites
10 answers to this question
Recommended Posts