5

I want to put a sprite image in my website, and use javascript to crop it to many separate images, then put these images into an image array.

Is this possible? Thanks.

  • You can always "fake" a crop with CSS/img elements and overflows. It would be one image (and should thus be shared in memory, not duplicated, so not so bad as it sounds :-), but each "view" would crop appropriately. – user166390 Dec 6 '10 at 7:56
  • Thank you very much! I will take it into account. – Sam Dec 6 '10 at 8:13
5

Take a look at jCrop, if you're using jQuery or JavaScript Image Cropper UI if you're using prototype.

What server-side language are you using? If you just want a straight crop w/o the graphical interface it might be better to do it server side.

If you're using PHP, check out this tutorial on nettuts

If you're using Ruby on Rails, check out Paperclip

| improve this answer | |
  • I want the website to automatically crop image after user connected it, not let user crop. Can this plug-in do this? Thanks!! – Sam Dec 6 '10 at 6:28
  • 1
    @Sam, that's why I am asking you what server-side language you are using. It would be better to do this server-side. I updated my answer to include a few suggestions for different languages. – jordanstephens Dec 6 '10 at 16:44

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