Java client for the Tinify API.
Java Shell
Permalink
Failed to load latest commit information.
src Update certificates to latest version, making sure there are no comme… Jan 18, 2017
.gitignore
.travis.yml Not supporting Java 6. Jan 18, 2016
LICENSE Update copyright. Feb 29, 2016
README.md Change link to tinify.com to http, as certificate is not valid for ti… Oct 29, 2015
deploy.sh
pom.xml
pubring.gpg Setting up auto deployment to Sonatype on tag push. Aug 14, 2015
secring.gpg.enc Setting up auto deployment to Sonatype on tag push. Aug 14, 2015
settings.xml
update-cacert.sh

README.md

Build Status

Tinify API client for Java

Java client for the Tinify API, used for TinyPNG and TinyJPG. Tinify compresses your images intelligently. Read more at http://tinify.com.

Documentation

Go to the documentation for the Java client.

Installation

Install the API client via Maven:

<dependency>
  <groupId>com.tinify</groupId>
  <artifactId>tinify</artifactId>
  <version>1.0</version>
</dependency>

Usage

import com.tinify.*;
import java.io.IOException;

public class Compress {
  public static void main(String[] args) throws java.io.IOException {
    Tinify.setKey("YOUR_API_KEY");
    Tinify.fromFile("input.png").toFile("output.png");
  }
}

Running tests

mvn test

Integration tests

TINIFY_KEY=$YOUR_API_KEY mvn -Pintegration integration-test

License

This software is licensed under the MIT License. View the license.