A library built with the CMake is used for image file decompress/compress or conversion on the Android platform.
- fix Bitmap.compress(Bitmap.CompressFormat.JPEG, quality, outputStream) ; Use libjpeg-turbo for YUV->RGB conversion in jpeg encoder
- easy customization
- compile common libraries for android.
- zlib v1.2.11
- libjpeg-turbo v2.1.2
- libpng v1.6.37
- libwebp v1.2.2
- support libjpeg-turbo built by cmake on Android platform.
- support jpeg compress.
- support heif v3.7.0
- build zlib v1.2.11, all ndk versions contains zlib that v1.2.3, it will cause many image libs which use zlib failed.
- Android NDK r22
- Android SDK
- Android SDK Build tools 31.x
- CMake 3.10.2
you can change the ndk version by build.gradle#ndkVersion
-
"libclang_rt.asan-arm-android.so" not found. CauseBy: -fsanitize=address, if midSdk < 21, remove the cflags or upgrade minSdk at least 21.
-
libpng with zlib build failed.
#if PNG_ZLIB_VERNUM != 0 && PNG_ZLIB_VERNUM != ZLIB_VERNUM
# error ZLIB_VERNUM != PNG_ZLIB_VERNUM \
"-I (include path) error: see the notes in pngpriv.h"
check zlib.h
and pngpriv.h
ZLIB_VERNUM == PNG_ZLIB_VERNUM
- add libjpeg built
- add libpng built
- add libwebp built
- add heif built