https://github.com/tinify/tinify-java
Java client for the Tinify API.
https://github.com/tinify/tinify-java
android image-compression image-optimization java java-library tinyjpg tinypng
Last synced: 17 days ago
JSON representation
Java client for the Tinify API.
- Host: GitHub
- URL: https://github.com/tinify/tinify-java
- Owner: tinify
- License: mit
- Created: 2015-08-07T12:28:04.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2025-03-19T07:58:39.000Z (about 1 month ago)
- Last Synced: 2025-04-06T05:14:59.030Z (24 days ago)
- Topics: android, image-compression, image-optimization, java, java-library, tinyjpg, tinypng
- Language: Java
- Homepage: https://tinypng.com/developers
- Size: 417 KB
- Stars: 138
- Watchers: 13
- Forks: 40
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE
Awesome Lists containing this project
README
[](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.tinify%22%20AND%20a%3A%22tinify%22)
[ ](https://github.com/tinify/tinify-java/blob/main/LICENSE)
[](https://github.com/tinify/tinify-java/actions/workflows/ci-cd.yml)# Tinify API client for Java
Java client for the Tinify API, used for [TinyPNG](https://tinypng.com) and [TinyJPG](https://tinyjpg.com). Tinify compresses your images intelligently. Read more at [http://tinify.com](http://tinify.com).
## Documentation
[Go to the documentation for the Java client](https://tinypng.com/developers/reference/java).
## Installation
Install the API client via Maven:
```xml
com.tinify
tinify
1.8.8```
## Usage
```java
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("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](LICENSE).