建议一个好的图像上传和裁剪工具

时间:2021-11-19 21:20:53

I'd like to know which up-and-crop tools you suggest to me. I tried couple of scripts like JCrop but I always get stack with some type of format like bmp. I either can't upload or I can upload but can't crop. If you use (or know) one that works well with different formats, then please just give me its name and I'll be strongly appreciated!

我想知道你建议我使用哪种新工具。我尝试了几个像JCrop这样的脚本,但我总是得到一些像bmp这样的格式的堆栈。我要么无法上传,要么我可以上传,但无法裁剪。如果您使用(或知道)适用于不同格式的一个,那么请给我它的名字,我将非常感谢!

2 个解决方案

#1


1  

Well, i dont know much about JCrop but you can build it up with several tools. I think image processing kind of works should be done on server side. There is a good OOP Library called Imagine. It's mostly based on Python's Imaging Library which is awesome and has decent documentation. And this is its crop functions documentation.

好吧,我不太了解JCrop,但你可以用几个工具来构建它。我认为图像处理类的工作应该在服务器端完成。有一个很好的OOP库名为Imagine。它主要基于Python的成像库,它非常棒且文档很好。这是它的作物功能文档。

On client side you can use some kind of image area selection tool to let the user determine desired area to crop. imgAreaSelect is good to go. Then you can send crop area to php by JQuery's post function or any other way.

在客户端,您可以使用某种图像区域选择工具让用户确定要裁剪的所需区域。 imgAreaSelect很不错。然后你可以通过JQuery的post功能或任何其他方式将裁剪区域发送到php。

#2


0  

It's amassing that in all this time this haven't got any other answers, I hope this helps.

在这段时间里,我们一直没有得到任何其他答案,我希望这会有所帮助。

Like stated in the other answer you should combine a few tools to solve each part of the problem.

如同在另一个答案中所述,您应该结合使用一些工具来解决问题的每个部分。

  1. To let the user select the cropping area:

    让用户选择裁剪区域:

    If you don't like jCrop you can try Guillotine. It's very lightweight, easy to set up and allows to crop, zoom and rotate images. It has touch support and it's responsive (fluid).

    如果您不喜欢jCrop,可以试试断头台。它非常轻巧,易于设置,可以裁剪,缩放和旋转图像。它具有触摸支持,并且响应迅速(流畅)。

    Keep in mind that you can't display image types that the browser doesn't support, but you can convert them in step 3.

    请记住,您无法显示浏览器不支持的图像类型,但您可以在步骤3中转换它们。

  2. To upload the images:

    要上传图片:

    For most cases, once you have the cropping area, with a simple file input will suffice.

    对于大多数情况,一旦你有裁剪区域,只需一个简单的文件输入即可。

    Now, if you want to upload files asynchronously check out this for a quick and easy set up or this for a more complex solution.

    现在,如果您想异步上传文件,请查看此内容以便快速轻松地进行设置,或者查看更复杂的解决方案。

  3. To actually crop and process the image:

    要实际裁剪和处理图像:

    Once uploaded you can crop, convert and process the images on the server, ImageMagick is a great tool for this. It's Open Source and many languages have wrappers for it.

    上传后,您可以在服务器上裁剪,转换和处理图像,ImageMagick是一个很好的工具。它是开源的,许多语言都有它的包装。

    You've tagged the question with PHP so here is a PHP wrapper for ImageMagick.

    你已经用PHP标记了这个问题,所以这里是ImageMagick的PHP包装器。

#1


1  

Well, i dont know much about JCrop but you can build it up with several tools. I think image processing kind of works should be done on server side. There is a good OOP Library called Imagine. It's mostly based on Python's Imaging Library which is awesome and has decent documentation. And this is its crop functions documentation.

好吧,我不太了解JCrop,但你可以用几个工具来构建它。我认为图像处理类的工作应该在服务器端完成。有一个很好的OOP库名为Imagine。它主要基于Python的成像库,它非常棒且文档很好。这是它的作物功能文档。

On client side you can use some kind of image area selection tool to let the user determine desired area to crop. imgAreaSelect is good to go. Then you can send crop area to php by JQuery's post function or any other way.

在客户端,您可以使用某种图像区域选择工具让用户确定要裁剪的所需区域。 imgAreaSelect很不错。然后你可以通过JQuery的post功能或任何其他方式将裁剪区域发送到php。

#2


0  

It's amassing that in all this time this haven't got any other answers, I hope this helps.

在这段时间里,我们一直没有得到任何其他答案,我希望这会有所帮助。

Like stated in the other answer you should combine a few tools to solve each part of the problem.

如同在另一个答案中所述,您应该结合使用一些工具来解决问题的每个部分。

  1. To let the user select the cropping area:

    让用户选择裁剪区域:

    If you don't like jCrop you can try Guillotine. It's very lightweight, easy to set up and allows to crop, zoom and rotate images. It has touch support and it's responsive (fluid).

    如果您不喜欢jCrop,可以试试断头台。它非常轻巧,易于设置,可以裁剪,缩放和旋转图像。它具有触摸支持,并且响应迅速(流畅)。

    Keep in mind that you can't display image types that the browser doesn't support, but you can convert them in step 3.

    请记住,您无法显示浏览器不支持的图像类型,但您可以在步骤3中转换它们。

  2. To upload the images:

    要上传图片:

    For most cases, once you have the cropping area, with a simple file input will suffice.

    对于大多数情况,一旦你有裁剪区域,只需一个简单的文件输入即可。

    Now, if you want to upload files asynchronously check out this for a quick and easy set up or this for a more complex solution.

    现在,如果您想异步上传文件,请查看此内容以便快速轻松地进行设置,或者查看更复杂的解决方案。

  3. To actually crop and process the image:

    要实际裁剪和处理图像:

    Once uploaded you can crop, convert and process the images on the server, ImageMagick is a great tool for this. It's Open Source and many languages have wrappers for it.

    上传后,您可以在服务器上裁剪,转换和处理图像,ImageMagick是一个很好的工具。它是开源的,许多语言都有它的包装。

    You've tagged the question with PHP so here is a PHP wrapper for ImageMagick.

    你已经用PHP标记了这个问题,所以这里是ImageMagick的PHP包装器。