There is an update of the component.
I needed a simple image manipulation tool, similar to the one in Word. As I may want to use it in commercial products, the license is of importance. Here are the three options I found:
TransformManager
Jack Doyle has written the TransformManager component. On his blog, you also find some interesting image effects. Unfortunately, he excludes commercial use without explicit permission in his license.
ObjectHandles
Marc Hughes published ObjectHandles. It works just fine and it is under the MIT license. I might use it somewhen but the next component was just a better fit:
TransformTool
TransformTool has been hacked by Trevor McCauley and extended by Alessandro Crugnola. Trevor’s license is found in the About section and says All source files and downloads on this site are completely free to use any way you see fit for personal or commercial use. They are provided as is with no guarantee or warranty and are to be used at your own risk. I guess this allows the BSD license. Alessandro agreed by mail.
With about 80 private variables and a whopping 1’790 lines of code, TransformTool.as implements most of the functionality. I started refactoring this class at first but I haven’t finished it yet. Before we go into the details, here is the Demo and the Source see Update.
What’s new in EditImage?
- Cropping including constrains to size ratio
- Serialize the sum of the transformations so you can store and retrieve the image edits.
- Reset the image to the original image dimension and orientation
- Reset image transformations to last set state.
- If rotated, controls are rotated as well
- Rotate snaps to 0 degrees and a multiple of a defined value. It does not step through the angle with a fixed value disregarding of the starting angle like 3.456 degrees.
- Snap to the initial top left position.
- Refactored the different tools like scaling and cropping into their own package.
- Minimal height and width for cropping.
- Removed things I don’t need like registration point or skewing.
- It is under the BSD license.
What’s missing?
- This is a prototype, not a production-ready component!
- No single test has been written.
- Further clean up of code including documentation.
- I have not yet touched the cursors. They currently don’t work at all.
- Hunting some more bugs like reseting sometimes confuses the orientation of the controls.
- Provide user feedback when hitting limits.
Nice Marc. I really dig the direction you are taking the tool. Thanks for putting in the work.
Just so you know, TransformManager is now available in AS3. http://blog.greensock.com/transformmanageras3/. Lots of new features including multiple selections. Warning: it’s not open source. There is a relatively small licensing fee, but I hope folks find that it’s well worth the price considering the functionality and ease of use. Good luck with your project.
Adobe For Mac…
[...]Image editing component in Flex: EditImage « I don't like computers.[...]…