A swifty client for Thumbor
Bumbo is available through CocoaPods and Carthage. To install it, simply add the following line to your Podfile:
pod 'Bumbo'
or in your Cartfile:
github "guilhermearaujo/Bumbo"
Configure your server and secret key:
Bumbo.configure(host: "https://thumbor.myurl.com/", secretKey: "MY_SECRET_KEY")
Bumbo.configure(host: "https://thumbor.myurl.com/", secretKey: nil) // Unsafe mode
Build your image URL with the desired settings and filters:
Bumbo.load("http://funnymemes.com/hilarious.jpg")
.trim()
.crop(leftTop: (x: 0, y: 0), rightBottom: (x: 200, y: 200))
.fitIn()
.resize(width: 320, height: 180)
.align(horizontal: .left, vertical: .bottom)
.useSmartDetectors()
.filter(.grayScale)
.filter(.stripICC)
.filter(.rotate(90))
.filter(.quality(50))
.filter(.noise(50))
.toURL()
The documentation provides a comprehensive list of functions and filters you can use to manipulate your images.
Bumbo is available under the MIT license. See the LICENSE file for more info.