Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/everythingme/webp-android
webp support for Android API Level 4 and up, includes the native library and a WebPImageView to render webp in your app
https://github.com/everythingme/webp-android
Last synced: 4 days ago
JSON representation
webp support for Android API Level 4 and up, includes the native library and a WebPImageView to render webp in your app
- Host: GitHub
- URL: https://github.com/everythingme/webp-android
- Owner: EverythingMe
- License: other
- Created: 2015-06-10T18:05:54.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-18T05:00:56.000Z (over 7 years ago)
- Last Synced: 2023-11-07T17:17:47.985Z (about 1 year ago)
- Language: C
- Homepage:
- Size: 516 KB
- Stars: 264
- Watchers: 16
- Forks: 57
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# webp
## webp for all! (Android devices)webp is a library we use at EverythingMe Launcher since we love webp. We use it to save bandwidth as well as shrinking our APK sizes.
webp is an adaptation of chromium's webp decoder, and an addition of a JNI wrapper to easily use it it in your java code.
## compile
just `gradle clean build`, and add the output aar to your libs (a public aar will be available soon)## How to use it?
```java
import me.everything.webp.WebPDecoderBitmap bitmap = WebPDecoder.getInstance().decodeWebP(bytes);
```## WebpImageView
We also made it easy to load webp images from xml to an ImageView```xml
```
Native webp support with lossless and transparency is officially supported in Android 4.2.1 and up. Prior to that transparency was not supported.
Since both 4.2 and 4.2.x have the same API level (17), we apply webp's decoding for all API levels lower than 18. For API level 18 and up we apply the standard `BitmapFactory.decodeByteArray()`.