Skip to content

ndahlquist/pngquant-android

Repository files navigation

pngquant-android

Circle CI Download

pngquant with basic Java bindings for Android. pngquant

Usage

In your build.gradle:

dependencies {
    compile 'com.ndahlquist:pngquant-android:0.2'
}

In your Android app: Optimizing the image with default settings:

File inputPngFile = getYourPng();
File outputPngFile = getOutputFile();
new LibPngQuant().pngQuantFile(inputFile, outputFile);

Alternative commands with more options:

new LibPngQuant().pngQuantFile(inputFile, outputFile, minQuality, maxQuality);
new LibPngQuant().pngQuantFile(inputFile, outputFile, minQuality, maxQuality, speed);
new LibPngQuant().pngQuantFile(inputFile, outputFile, minQuality, maxQuality, speed, floydDitherAmount);

Building

  • This project includes git submodules; please make sure to git clone --recursive. Alternatively, git submodule init; git submodule update.
  • On OS X, please install wget: brew install wget.
  • From the top-level directory, run ./gradlew installDebug. This will download all dependencies, build the library, and install a test application to a connected Android device.

About

pngquant with basic Java bindings for Android.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published