Generate thumbnails and copyright classes for pictures
In recent days, I looked at the image processing of PHP function, the previous demand for less, also did not see how, recently had time to look. Feel the image processing some simple function can also, complex even, GD library are 2.0.1, or do not support Chinese, read a few articles, want to use Chinese can only first convert GB2312 to Unicode and then write the picture, too troublesome, simply use English anyway. In the Image generation section you can define the maximum height and width of the picture, which is suitable for the news and albums system. GD2.0.1 in the picture processing has greatly improved, I tried the next imagecopyresized and imagecopyresampled, the latter to deal with the picture is obviously better than the former, according to the manual that the latter to change the size of the picture resampling basic remains not distorted, the effect of generating thumbnails is really good.
-------------------------------------------------------------below is the class-----------------------
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.