ErliSoares / pngquant-android

pngquant with basic Java bindings for Android.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

License:Other


Languages

Language:C 69.4%Language:Java 20.8%Language:Makefile 6.6%Language:Shell 3.1%