Thumbor Enterprise Edition (a.k.a thumborEE) is a library to generate encrypted thumbor URLs.
In order to use it, just download the latest version from the listed versions below in the Downloads section of the readme file and add it to your project.
Using thumborEE is pretty simple, all you have to do is create a CryptoURL instance with the proper key and original image URL and start customizing it.
CryptoURL crypto = new CryptoURL('my-security-key', 'http://my.server.com/path/to/my/image.jpg'); System.out.println(crypto.resize(300, 200).withSmartCropping().toString()); // /l42l54VqaV_J-EcB5quNMP6CnsN9BX7htrh-QbPuDv0C7adUXX7LTo6DHm_woJtZ/my.server.com/some/path/to/image.jpg
For more information on what each option means don't forget to check thumbor's documentation.
Tells thumbor to return metadata instead of the actual image.
Tells thumbor to use smart cropping (Face and Feature Recognition).
Changes the target width and height for the generated image.
PS: if one of the dimensions (width or height) is zero, proportional dimension is applied. If both are zero, original image is returned.
Tells thumbor that the specified image must fit in the given box (defined by width x height).
Tells thumbor to crop based on a given alignment (Left, Center, Right, Top, Middle, Bottom). For more info, check thumbor's documentation.
PS: If you supply only one alignment, the default is assumed for the other one.
Specifies the bounding points that tell thumbor where to manually crop the image.
crypto.crop(left, top, right, bottom);
Tells thumbor to use this filter. Can be called multiple times to specify different filters.
- Release 0.3.0 (04-Apr-2012) - Bug fix (Contribution of Fernando Carolo).
- Release 0.2.0 (15-Mar-2012) - Filters support.
- Release 0.1.0 (14-Mar-2012) - Initial release, still lacking filters support.
Thumbor is licensed under the MIT License:
The MIT License
Copyright (c) 2011 Bernardo Heynemann email@example.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.