PHP 图像上传器(具有调整大小和裁剪功能)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8622608/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
PHP Image uploader (with resize and crop)
提问by user1114260
I'm creating a form which should allow a user to upload a photo (along with other form elements such as text boxes) but I'm in need of a PHP script which will allow the photo to be uploaded, and if the image does not conform to specific dimensions to be resized and then cropped (from bottom center of the image).
我正在创建一个表单,它应该允许用户上传照片(以及其他表单元素,如文本框),但我需要一个 PHP 脚本来允许上传照片,如果图像上传不符合要调整大小然后裁剪的特定尺寸(从图像的底部中心)。
Can you recommend any scripts available?
你能推荐任何可用的脚本吗?
回答by Dimme
A fast search gave me the following results.
快速搜索给了我以下结果。
If I was you I would use Jcropwith my own uploading script.
回答by Prasad Rajapaksha
I would like to recommend this example.
我想推荐这个例子。
http://www.webmotionuk.co.uk/php-jquery-image-upload-and-crop/
http://www.webmotionuk.co.uk/php-jquery-image-upload-and-crop/
Good luck.
祝你好运。
Prasad.
普拉萨德。
回答by AbTheAsk
I recommend upload.class.php
. It is the best class for handling images.
我推荐upload.class.php
。它是处理图像的最佳类。
You can find it here: http://www.verot.net/php_class_upload.htm
你可以在这里找到它:http: //www.verot.net/php_class_upload.htm