CwCrop
Posted 2 months ago.
About / Feedback • Demo • Help / Download
A javascript-(mootools)-only tool to select a part of an image and crop it
Requirements
- Works in Safari 3+, Firefox 3+, Chrome 3+, IE 6, IE 7, IE 8 and Opera 9+
- Requires mootools 1.23+ with Drag.Move and (for example) PHP to crop the image
Features
- Only 4 DIVs necessary
- Marching Ants effect via CSS..! (Safari and Firefox of course only)
- Shows crop dimensions (w x h) – and x/y-position while moving (configurable)
- Crop-Button inside the frame (optional)
- Hold SHIFT to select a square area
- Also works with scaled images – shows the real size then
- Minimal size, maximal size, initial position, fixedratio (optional) and x-/y-ratio constraints are configurable
- Result: x- and y-position, width and height
Demo
- Try it out here: CwCrop Demo »
Downloads
- Plugin & demo download: Mootools Forge »
Github Repository: github.com/mariofischer/cwcrop »
Changelog
0.70
Updates for value checking, documentation, performance Bugfixes for larger original image0.68
Added fixed ratio0.67
Initial public release Posted to Mootools Forge, GithubAlso like to have an avatar image? Get one at gravatar.com (free) »
Please show example, how to use fixed ratio. 16:9
Hi -
try this:
fixedratio: 1.7777
});
Since 16 / 9 = 1.77777…, that’s the value for the fixed ratio.
mario
Hi there,
Great plugin. One question though. Is there a setting for fixed ratio, cause I couldn’t find it and it would really be usefull?
Thanks,
Daniel
Hi -
you can set
then there’s a fixed ratio of 1. For other cases it’s not yet possible, but I’ll add it in the next release, good idea.
Now it’s added in the current release.