How to crop/resize image using php with jquery?

Step 1: Your root folder is uploadcrop

Step 2: create uploadcrop ->upload_crop.php file with upload_crop.docx file code
Download upload_crop.php file from here

Step 3: Download and put below js files into uploadcrop ->js folder with jquery-pack.js and jquery.imgareaselect-0.3.min.js filenames.
Download jquery-pack.js file from here
Download jquery.imgareaselect-0.3.min.js file from here

Step 4: Create uploadcrop ->upload_pic folder and put iamge with resized_pic.jpg name.

Step 5: Run http://localhost/uploadcrop/upload_crop.php file and select your file from click on browse button.

Step 6: By default you can crop 100*100 resized image from the large image.

Step 7: You can also change cropped image size from upload_crop.php file line no. 10 and 11.

 $thumb_width = "100";					// Width of thumbnail image
$thumb_height = "100";					// Height of thumbnail image 

Step 7: When you click on Save thumbnail button your cropped image saved.

Posted in PHP. 1 Comment »

One Response to “How to crop/resize image using php with jquery?”

  1. Suc Tre IT Says:

    Thank u
    But upload is limited because many do not upload the image will replace the previous upload and no maximum height for the image resize

Speak Your Mind

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: