The official Java client for the Imagizer Media Engine
Java
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
gradle/wrapper
src
.gitignore
ImagizerClient.iml
LICENSE
README.md
build.gradle
gradlew
gradlew.bat
settings.gradle

README.md

Imagizer Java Client

The official Java client for the Imagizer Media Engine.

The Imagizer Media Engine accelerates media delivery to your mobile Apps or Webpages by dynamically rescaling, cropping, and compressing images in real time. See all Imagizer features in our doc.

Install from JCenter or Maven

dependencies {
    compile 'com.nventify:ImagizerClient:0.1.4'
}

Build Jar from Source

gradle build

Unit Tests

gradle test

Basic Usage

Using the free to test Imagizer Demo Service

import com.nventify.ImagizerClient;

public class ImagizerClientExample {
    public static void main(String[] args) {
        ImagizerClient client = new ImagizerClient();
        client.setOriginHost("example.com");

        String url = client.buildUrl("image.jpg")
                .addParam("width", 200)
                .addParam("height", 400)
                .addParam("crop", "fit")
                .toString();

        System.out.println(url);
    }
}

// prints out
// http://demo.imagizercdn.com/image.jpg?crop=fit&height=400&hostname=example.com&width=200

Using your own Imagizer Instance

import com.nventify.ImagizerClient;

public class ImagizerClientExample {
    public static void main(String[] args) {
        ImagizerClient client = new ImagizerClient("your-imagizer-host.com");

        String url = client.buildUrl("image.jpg")
                .addParam("width", 200)
                .addParam("height", 400)
                .addParam("crop", "fit")
                .toString();

        System.out.println(url);
    }
}

// prints out
// http://your-imagizer-host.com/image.jpg?crop=fit&height=400&width=200