Pollexor

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

View Javadoc

Create Thumbor Instance
// Without encryption:
Thumbor thumbor = Thumbor.create("http://example.com/");

// With encryption:
Thumbor thumbor = Thumbor.create("http://example.com/", "key");
Simple Resize
thumbor.buildImage("http://example.com/image.png")
    .resize(48, 48)
    .toUrl()
Resize and Smart Crop
thumbor.buildImage("http://example.com/image.png")
    .crop(10, 10, 90, 90)
    .resize(40, 40)
    .smart()
    .toUrl()
Resize and Crop with Gravity
thumbor.buildImage("http://example.com/image.png")
    .crop(5, 5, 195, 195)
    .resize(95, 95)
    .align(BOTTOM, RIGHT)
    .toUrl()
Resize and Four Filters
thumbor.buildImage("http://example.com/background.png")
    .resize(200, 100)
    .filter(
        roundCorner(10),
        watermark(thumbor.buildImage("http://example.com/overlay1.png")),
        watermark(thumbor.buildImage("http://example.com/overlay2.png")),
        quality(85)
    )
    .toUrl()
Image Format
thumbor.buildImage("http://example.com/image.png")
    .resize(48, 48)
    .format(WEBP)
    .toUrl()
Circular Image
thumbor.buildImage("http://example.com/image.png")
    .resize(48, 48)
    .roundCorner(24)
    .toUrl()
Fork me on GitHub

by Square, Inc.