How to crop image using jquery ajax and php?

Hi, I am engaged in a social networking project where I have the ability to add / edit photos. When the user clicks the button, the image will be uploaded to the database and it will be updated ... but then when the user clicks on the crop button it will open in some pop-up or modal window, and then the user will crop this image, after which he will save the database data through ajax and php, and then display it in its place.

Is there any jquery plugin like this one or do I need to make my own code.

if custom code, then what is the best way.

+6
source share
8 answers

This is the perfect script I found. for this

UberUploadCropper V2 - Download, Trim, No Flash

+1
source

Try my online Photoshop tool built into PHP GD and Javascript.

http://www.sajithmr.me/photoshop/

Here you can crop, resize, rotate the watermark image and add watermark text

I also posted the full source code on my blog.

Hope this helps

thanks

Saith

+1
source

A wonderful tutorial on cropping a photo using php and jquery , I did it for 5 months, and it has been used by many applications, http://www.bewebdeveloper.com/tutorial-about-crop-photo-using-php-and- jquery

+1
source

You can always use the jCrop plugin (only Google jCrop) and use imagik to handle size and crop.

jCrop only basically collects the x and y coordinates and sets the value to a hidden field in the form. Therefore, as soon as you publish the form, you can simply use the imagik cropImage method to crop the image using post values, for example:

'cropImage ($ width, $ height, $ x, $ y)'

Sorry, the answer is a bit vague.

0
source

You can try this plugin either http://odyniec.net/projects/imgareaselect/

0
source

Source: https://habr.com/ru/post/896975/


All Articles