The watermark effect is only for images and text is not displayed.
Source: Internet
Author: User
The watermark effect is only an image. if the text is not displayed on the computer, it is correct. if the text is not displayed at home, only the image is displayed. & Lt ;? Php // watermark effect header ("content-type-: image/jpeg"); $ im = imagecreatefromjpeg ("images/xx.jpg"); $ tex watermark effect is only image, text not displayed
There is no error in running on the unit computer, but the text is not displayed when running at home, only images.
// Watermark effect
Header ("content-type-: image/jpeg ");
$ Im = imagecreatefromjpeg ("images/xx.jpg ");
$ Textcolor = imagecolorallocate ($ im, 136 );
$ Fnt = "C:/WINDOWS/Fonts/SIMKAI. TTF ";
$ MOV = iconv ("gb2312", "UTF-8", "Changbai Mountain Tianchi ");
Imagettftext ($ im, 600,340, $ textcolor, $ fnt, $ motto );
Imagejpeg ($ im );
Imagedestroy ($ im );
?>
Please help me. if there is a problem with the PHP and GD library environments, how should we detect and modify them...
------ Solution --------------------
Imagettftext ($ im, 600,340, $ textcolor, $ fnt, $ motto );
Is the image so big? Do not check
------ Solution --------------------
So what's the problem?
Unless SIMKAI. TTF is damaged
Otherwise, do not report an error?
------ Solution --------------------
Change font
Change the starting coordinate
600,340 may be out of the image range
------ Solution --------------------
So do you know that the program file is not stored as UTF-8 encoded?
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.