Working with images
Is there some script (better if php), which can do some operations like?
- resizing
- reduce/increase lightness
- change contrast
- 开发者_如何学编程change quality
Or some api's, which can help.
Thanks.
For most things I use PHP's imageXXXX()
functions; they're portable, and pretty much every PHP install I've come across has them available.
For more advanced needs, consider using ImageMagick or some other scriptable image processing; if it doesn't come with a PHP interface, or you cannot install the required extensions, you can always 'shell out'.
Also, caching the processed images is probably a good idea in most situations, unless the output is different every time.
I used to use ImageMagik for this kind of thing. When I used it, you were restricted to Perl. It seems that there are now two PHP interfaces to the API.
I used this one recently and it worked really well for me, http://pear.php.net/package/Image_Transform
Click on the Download, and Download a great php class for resizing and croping images, the simplest way!
And english version
精彩评论