The project has been discontinued. As an alternative you should have a look at Pintura Image Editor.
Pintura supports every DarkroomJS features and more (resizing, free rotating, color adjustment, photo filters, annotating, etc), with a customisable UI, touch friendly and integrations with React or Vue.
Features: Enforce crop aspect ratio. Fast image uploads. Rotate, resize and flip. Overlay crop guides. Photo filter effects. Responsive and accessible.
The library is designed to be easily extendable. The core script only transforms the target image to a canvas with a FabricJS instance, and creates an empty toolbar. All the features are then implemented in separate plugins.
Each plugin is responsible for creating its own functionality. Buttons can easily be added to the toolbar and binded with those features.
Currently, the implemented features are:
- Crops the image by selecting a zone with your mouse. This supports several options like ratio and dimensions control (min/max).
- Adds two buttons to let you rotate hte image to the left or the right.
- Allows to undo and redo any changes on the main image.
- Transform back the canvas into image. This is mainly a proof of concept to show how plugins work. This one only makes a few lines.
The project is under MIT license. Feel free to fork the project on GitHub or report issues. All ideas are also welcome.