Giter VIP home page Giter VIP logo

imagecrop's Introduction

Description
-----------
This module makes a javascript toolbox action available for image styles.
It can currently 'hook' into several modules by adding a 'javascript crop' link on the edit forms of supported modules and/or fields. 
The popup window will display all available styles with
a javascript crop action. In your theming you can use the imagestyle theme function with
a preset. The style action will make a database call to choose the right crop area.

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 image modules/fields.

Everyone is invited to submit patches for more module support. I might
even give some people cvs access.

Installation
------------
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)

After you enable the module, you can go to admin/settings/imagecrop and set some extra settings.
  - Theme beïng used: The theme that is used for showing the popup. Admin theme is recommended.
  - Trigger imagecrop also for: Enable imagecrop for picture uploads that are not a field (ex profile pictures)
  - popup width and height
  - show cancel button: A button to cancel the popup is available in popup
  - skip image previews: Default imagecrop has a preview screen. If you want people to land on the cropping page, you can enable this checkbox
  - Advanced UI controls: Show a sidebar with live cropping info and the possibility to insert width / height
  - Step size for scale dropdown: The steps from the scaling selection. (ex: 50px = 500px width, 450px width, 400px width)
  - Autoscale the initial crop to fit the window: When a user uploads a big picture, the image will be scaled down, to fit in the popup
  - Allow rotation from image: Users can rotate an image 

After the settings are done. You can enable imagecrop for the styles you want.
Go to the image styles management, and edit the style you want. Choose 'Javascript crop' as an effect, and add it to your style.
You can also add 'Reuse a javascript crop selection'. This will automaticaly crop the image to the style you selected in this effect.

If you want to enable imagecrop for a field (ex image_field). Go to the field settings from your content type, and edit the image_field.
In the field settings, you see checkboxes from all available styles. (Available imagecrop styles).
Select the styles that you want to enable for this field.
After saving, a user will now see "Crop image" next to the uploaded image.

A cron task cleans up the imagecrop table clearing records from files and/or presets
which do not exist anymore, so make sure cron is running.

Extra Coolness
--------------
Imagecrop supports several modal modules to open your popup with.
Supported modules are:
  - colorbox (make sure you included node/*/edit in the module settings)
  - iframe
  
Features, support, bugs etc
---------------------------
File request,bugs,patches on http://drupal.org/project/imagecrop

Author
------
Nils Destoop - http://drupal.org/user/361625 - http://www.menhir.be

imagecrop's People

Contributors

zuuperman avatar longwave avatar swentel avatar slashrsm avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.