Pollexor

Java client for the Thumbor image service which allows you to build URIs in an expressive fashion using a fluent API.

Simple Resize
image("http://example.com/image.png")
    .resize(48, 48)
    .toUrl()
Resize and Smart Crop
image("http://example.com/image.png")
    .crop(10, 10, 90, 90)
    .resize(40, 40)
    .smart()
    .toUrl()
Resize and Crop with Gravity
image("http://example.com/image.png")
    .crop(5, 5, 195, 195)
    .resize(95, 95)
    .align(BOTTOM, RIGHT)
    .toUrl()
Resize and Four Filters
image("http://example.com/background.png")
    .resize(200, 100)
    .filter(
        roundCorner(10),
        watermark(image("http://example.com/overlay1.png")),
        watermark(image("http://example.com/overlay2.png")),
        quality(85)
    )
    .toUrl()
Resize with Encryption
image("http://example.com/image.png")
    .resize(48, 48)
    .key("super secret key")
    .toUrl()
Full URL Construction
image("http://example.com/image.png")
    .resize(48, 48)
    .host("http://me.com")
    .toUrl()
Fork me on GitHub

by Square, Inc.