在Android的NDK使用pngquant LIB(libimagequant) [英] Use pngquant lib (libimagequant) in Android NDK
问题描述
我试图在OS X上使用NDK R10(64位)使用PNG量化库在pngquant.org/lib在我的Android项目。
I am trying to use the png quantization library at pngquant.org/lib in my Android project using the NDK r10 (64bit) on OS X.
我在编译库取得进展。我现在的问题是,在为size_t类型不能得到解决。我试着包括以下文件夹:
I am making progress in compiling the library. The problem I have now is that the size_t type cannot be resolved. I tried including the following folder:
LOCAL_C_INCLUDES := $(NDK_TOOLCHAIN)/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.9/include
但是这并不能帮助。
but that does not help.
我将是一个空的工作Android项目很感兴趣与包括pngquant。
I would be really interested in an empty working Android project with pngquant included.
任何帮助真的是AP preciated。
Any help is really appreciated.
NB对不起改变的问题,但原来的问题,我问它有一些不正确的事实。
NB sorry for changing the question, but the original question I asked had some incorrect facts in it.
推荐答案
如果你只是想使用这个库使用默认设置,我做了一个的简单的Android库可满足您的要求。
If you just want to use this library with default settings, I've made a simple Android library that may suit your purposes.
在您的build.gradle:
In your build.gradle:
dependencies {
compile 'com.ndahlquist:pngquant-android:0.2'
}
在你的Android应用:
In your Android app:
File inputPngFile = getYourPng();
File outputPngFile = getOutputFile()
new LibPngQuant().pngQuantFile(inputFile, outputFile);
这篇关于在Android的NDK使用pngquant LIB(libimagequant)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!