3

I'd like to have ability to resize pictures on my site. Algorithm:

  1. You upload an image to site. (grey)
  2. That image appears in orange part.
  3. Red part - is a rectangular, with help of which we can choose which part of image to show in preview_zone.
  4. After I choose right zone, I press OK and data(resize zone) uploads to server.
  5. Server crops image with PHP. Image

Maybe you could find any articles, how to do it, or sites with such api. Or do it by yourselves. I would be very gratefule for your help.

1 Answer 1

9

You should check out JCrop jQuery image cropping plugin:

http://deepliquid.com/content/Jcrop.html

Repo: https://github.com/tapmodo/Jcrop https://github.com/tapmodo/Jcrop/tree/master/demos

Examples: http://deepliquid.com/projects/Jcrop/demos.php

One of the demos seems to match your requirement. (http://deepliquid.com/projects/Jcrop/demos.php?demo=live_crop) You can make small modifications to get your desired output.

1

Not the answer you're looking for? Browse other questions tagged or ask your own question.