Download & Extend

Image javascript crop

Imagecrop

This module makes an Imagecache 2 (D6) or Styles (D7) 'javascript crop' toolbox action available for use with several modules (see below)

You define one or more presets in imagecache using the 'javascript crop" action, a new 'javascript crop' link appears underneath the image on the node edit screen, and the resulting popup window will display those presets. This screen shows the original image and initially applies the initial crop settings defined in the preset you select, e.g.: crop 50%-50%, center-center. However, you can then choose a different area of the original picture you want to crop, dragging an overlay box over the image, altering the size etc. You also can rotate or scale the image first.

Changes made to the attachments are not permanent until you save the results, at which time your custom cropped version will overwrite the default file at that preset's location in the Imagecache filesystem.

The original image is always preserved, as usual with Imagecache, but anytime a call is made to that preset's URL (/files/imagecache/preset/fileid), Imagecache javascript crop module looks to see if you have overridden the default crop settings for that particular preset, and if you have, it displays your custom-cropped result.

In your theming you can use the imagecache theme function with your defined preset. The imagecache action will make a database call to choose the right crop area and (if necessary) scale down the image first.

The main difference with projects like eyedrop or imagefield_crop is that it doesn't provide it's own widget to upload images, instead it just 'hooks' into the image-handling modules you are already using.

Supported modules
-------------------------

Drupal 6
image and Acidfree Albums : Link is underneath the thumbnail on the edit page.
Node Images : Underneath the thumbnail. You will need to add an override function to your theme's template.php; see README.txt for details.
Imagefield
Image FUpload

Drupal 7
Core imagefield
Profile picture
Media module

Everyone is invited to submit patches supporting other modules. Use the issue queue for patches and discussion.

Three screencasts are available:
http://www.screencast.com/users/timmillwood/folders/Jing/media/ef47425b-... : Drupal 6
http://realize.be/imagecrop-5x10-out : first release
http://realize.be/imagecache-2-and-imagecrop : early development

Installation

Drupal 6
You need imagecache 2, imageapi and jquery_ui.
After you enable the module, you can go to admin/settings/imagecrop and enable support for modules & fields to display a link.

Drupal 7
Core Image module should be enabled

If you use jquery update. Make sure you also have the latest version from jquery_ui. (For example jquery update 1.3.2 needs jquery ui 1.7.3, and vice versa)

More info is in the README.txt file.

Extra Coolness
Imagecrop supports several modal modules to open your popup with.
Supported modules are:
- thickbox
- colorbox (make sure you included node/*/edit in the module settings)
- modalframe
- shadowbox (make sure you included node/*/edit in the module settings)

In the Drupal 7 version, only colorbox and iframe are supported at moment. Other modules will be added, when they are ported

Downloads

Recommended releases

Version Downloads Date Links
7.x-1.0-rc3 tar.gz (23.52 KB) | zip (30.49 KB) 2011-Aug-31 Notes
6.x-1.2 tar.gz (20.62 KB) | zip (24.66 KB) 2011-Jan-25 Notes

Development releases

Version Downloads Date Links
7.x-1.x-dev tar.gz (42.13 KB) | zip (51.21 KB) 2012-Oct-30 Notes
6.x-1.x-dev tar.gz (38.02 KB) | zip (43.03 KB) 2012-Feb-07 Notes

Project Information


Maintainers for Image javascript crop

  • zuuperman - 219 commits
    last: 28 weeks ago, first: 4 years ago
  • swentel - 55 commits
    last: 4 years ago, first: 5 years ago

Issues for Image javascript crop

To avoid duplicates, please search before submitting a new issue.
All issues
Bug reports
Statistics (2 years)
New issues
Open bugs
Participants
nobody click here