Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AVIF Image Rendering Issues: Blue Tint and Thin Strokes #5141

Open
vignesh-em opened this issue May 16, 2023 · 4 comments
Open

AVIF Image Rendering Issues: Blue Tint and Thin Strokes #5141

vignesh-em opened this issue May 16, 2023 · 4 comments

Comments

@vignesh-em
Copy link

Glide Version: 4.14.2

Integration libraries: avif-integration

Device/Android Version: Samsung Galaxy M52 / Android 13

Issue details:

  • Some images with translucent background are rendered with a blue tint.
  • Fine strokes are rendered visibly thinner than webp version (I initially thought this is because of data loss, but this was not the case when rendered on Chrome).

Both issues do not occur when rendered on Chrome on the same device. Could this be an issue with the decoder (libavif_android.so) that Glide internally uses to decode AVIF formats?

The demo project can be found here.
Blue Tint - branch: issue/blue-tint
Thin Strokes - branch: issue/thin-strokes

Screenshots:

blue-tint
food-bb-icon

@vignesh-em vignesh-em changed the title AVIF Image Rendering Issues in Glide: Blue Tint and Thin Strokes AVIF Image Rendering Issues: Blue Tint and Thin Strokes May 16, 2023
@vignesh-em
Copy link
Author

@vigneshvg, could this be an issue with the decoder Glide uses to decode AVIFs? What do you think?

@vigneshvg
Copy link
Contributor

@vigneshvg, could this be an issue with the decoder Glide uses to decode AVIFs? What do you think?

Thanks for the report and the files. I will take a look.

@vigneshvg
Copy link
Contributor

vigneshvg commented May 16, 2023

I am able to reproduce both the issues (blue tint and thin stroke) in Glide 4.15.1 and both were fixed by #5128.

That PR is not in a Glide Release yet (I have filed an issue for that separately: #5142).

In the meantime, you can explicitly update your libavif dependency in order to render these images properly. I updated the dependency in my build.gradle as follows and that fixed the issues for me:

Replace:

implementation 'com.github.bumptech.glide:avif-integration:4.15.1'

With:

implementation 'org.aomedia.avif.android:avif:0.11.1.3c786d2'
implementation ('com.github.bumptech.glide:avif-integration:4.15.1') {
    exclude group: 'org.aomedia.avif.android', module: 'avif'
}

Hope that helps.

@vignesh-em
Copy link
Author

Thank you so much for the quick resolution, @vigneshvg. I really appreciate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants