ETC在Android代码中压缩图像?

发布于 2024-12-28 16:41:42 字数 117 浏览 2 评论 0原文

我使用用户选择的颜色和其他选项在代码中创建位图文件。我会将其作为我的代码的纹理加载。所以我想知道是否有一种方法可以在代码中压缩这个新创建的位图并将其保存在本地以便每次加载应用程序时使用它。请让我知道是否有此类选项。谢谢。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

挽心 2025-01-04 16:41:42

是的,你可以做到。

Android 中的 Java API 在此提供此功能: http://developer.android.com/ Reference/android/opengl/ETC1Util.html

在本机代码中,您可以使用来自 Android 源的 etc1.cpp 文件。它位于 opengl/libs/ETC1 文件夹下的 基础存储库 中。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文