Skip to content

Repository files navigation

Maven CentralMIT LicenseJava CI/CD

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.8.8</version>
</dependency>

Usage

importcom.tinify.*;
importjava.io.IOException;
publicclassCompress {
publicstaticvoidmain(String[] args) throwsjava.io.IOException {
Tinify.setKey("YOUR_API_KEY");
Tinify.fromFile("unoptimized.png").toFile("optimized.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.

Releases

Packages

Used by

Contributors

Languages