bumptech / bumptech/glide

When using RequestOptions, webp animations cannot be displayed.

Open
#5,441 2 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.16.0

**Device/Android Version**: Xiaomi 14,Anroid version 14

**Use Detail**:When RequestOptions is not set, it works fine. But after setting it, it doesn't work.

**Glide load line / `GlideModule` (if any) / list Adapter code (if any)**:
```kotlin
val options = RequestOptions().fitCenter()

Glide.with(this)
.load("https://oss-console-img-demo-cn-hangzhou-3az.oss-cn-hangzhou.aliyuncs.com/example.gif?x-oss-process=image/resize,w_200/format,webp")
.apply(options)
.placeholder(R.color.black)
.into(binding.image)
```

**Stack trace / LogCat**:
```ruby
2024-08-23 10:57:19.341 13550-13550 Glide com.example.notificationtest I Root cause (1 of 1)
java.lang.IllegalArgumentException: Unable to convert android.graphics.drawable.AnimatedImageDrawable@b990125 to a Bitmap
at com.bumptech.glide.load.resource.bitmap.DrawableTransformation.transform(DrawableTransformation.java:55)
at com.bumptech.glide.load.engine.DecodeJob.onResourceDecoded(DecodeJob.java:578)
at com.bumptech.glide.load.engine.DecodeJob$DecodeCallback.onResourceDecoded(DecodeJob.java:642)
at com.bumptech.glide.load.engine.DecodePath.decode(DecodePath.java:60)
at com.bumptech.glide.load.engine.LoadPath.loadWithExceptionList(LoadPath.java:76)
at com.bumptech.glide.load.engine.LoadPath.load(LoadPath.java:57)
at com.bumptech.glide.load.engine.DecodeJob.runLoadPath(DecodeJob.java:539)
at com.bumptech.glide.load.engine.DecodeJob.decodeFromFetcher(DecodeJob.java:503)
at com.bumptech.glide.load.engine.DecodeJob.decodeFromData(DecodeJob.java:489)
at com.bumptech.glide.load.engine.DecodeJob.decodeFromRetrievedData(DecodeJob.java:434)
at com.bumptech.glide.load.engine.DecodeJob.onDataFetcherReady(DecodeJob.java:399)
at com.bumptech.glide.load.engine.DataCacheGenerator.onDataReady(DataCacheGenerator.java:100)
at com.bumptech.glide.load.model.ByteBufferFileLoader$ByteBufferFetcher.loadData(ByteBufferFileLoader.java:62)
at com.bumptech.glide.load.engine.DataCacheGenerator.startNext(DataCacheGenerator.java:77)
at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:311)
at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:277)
at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:235)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:424)
at java.lang.Thread.run(Thread.java:1012)
at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultPriorityThreadFactory$1.run(GlideExecutor.java:383)
```

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.