bumptech / bumptech/glide

AVIF Image Rendering Issues on Android 12+: Black Backgrounds

Open
#5,140 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
35k
Forks
6.2k
Avg merge
1d 11h
Merged PRs (30d)
8

Description

**Glide Version**: 4.14.2

**Integration libraries**: none

**Device/Android Version**: Samsung Galaxy M52 / Android 13

**Use case background**:

[Android 12 introduces support for AVIF images.](https://developer.android.com/about/versions/12/features#avif) So starting Android 12, Glide should be able to decode AVIFs without avif-integration library. However, when used without the avif integration library, the avif images are sometimes not rendered or rendered with a black background (the image has transparent parts).

I also tested this on a Pixel 6 Pro running Android 12. The image did not render.

I am not sure whether this is a platform issue or an issue with the way glide processes avif images but I do see the devices have a decoder that supports video/av01 format.

The sample project can be found [here](https://github.com/vignesh-em-swiggy/avif-android).

![food-avif-vs-webp (2)](https://github.com/bumptech/glide/assets/14243984/3d6bd683-e932-4d13-983d-8632d4fd72d3)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.