bumptech / bumptech/glide

[question] Display GIF with rounded corners

Open
#3,361 6 comments 1 reaction 0 assignees View on GitHub
enhancement GIF
Dominant language
Java
Stars
35k
Forks
6.2k
Avg merge
1d 11h
Merged PRs (30d)
8

Description

Hi,

I would like to show GIF with rounded corners like with images, with the known trick - instead of using `canvas.drawBitmap`, create a bitmap shader, apply it to paint, and use `canvas.drawPath` with the rounded path.

I see that `GifDrawable` is Bitmap-based and public, which is nice.
I also think that Glide offers a way to use my GifDrawable subclass instead.

But I don't see how I can hook into the drawing step.

Would you consider adding a protected `onDrawBitmap` inside `GifDrawable` so it can be overriden for this purpose? Or is there another way of doing what I want?

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.