简体   繁体   中英

ETC Compress image in Android code?

I create a bitmap file in code using the user selected color and other options. I would be loading it as a texture for my code. So I wanted to know if there is a way to compress this newly created bitmap in the code and save it locally to use it every time on load of application. Please let me know of there is any such option. Thank you.

Yes you can do it.

Java API in Android provides this functionality here: http://developer.android.com/reference/android/opengl/ETC1Util.html

In native code you can use etc1.cpp file from Android sources. It is in base repository under opengl/libs/ETC1 folder.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM