适用于 Android 的 WebP [英] WebP for Android

查看:35
本文介绍了适用于 Android 的 WebP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有关于如何在 Android 上使用 WebP 的示例?我试图获取 webp 图像列表并将它们显示在带有 imageview 的列表视图中.

Are there any examples on how to use WebP for Android? Im trying to get a list of webp images and show them in a listview with an imageview.

我知道有一个 libwebp api,并且我已经使用 NDK 将它集成到我的 Android 项目中,但是我该如何使用该 api 来获取我的二进制 webp 并在图像视图中显示它?

I know theres a libwebp api and I have integrated it into my Android project using the NDK, but how do I excatly use the api to take my binary webp and show it in an imageview?

任何帮助都会很棒!

推荐答案

WebP 是 支持 Android 4.0+,即 API 级别 14.您可以使用android.os.Build.VERSION.SDK_INT >= 14.

WebP is supported for Android 4.0+, a.k.a. API level 14. You can check using android.os.Build.VERSION.SDK_INT >= 14.

这篇关于适用于 Android 的 WebP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆