mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-25 22:18:00 +01:00
Always decode non-animated images as bitmap
This closes https://github.com/FossifyOrg/Gallery/issues/148 TODO: Animate APNG thumbnails.
This commit is contained in:
parent
86b22f828a
commit
87086c434c
1 changed files with 3 additions and 2 deletions
|
@ -540,8 +540,9 @@ fun Context.loadImageBase(
|
||||||
options.optionalTransform(WebpDrawable::class.java, WebpDrawableTransformation(FitCenter()))
|
options.optionalTransform(WebpDrawable::class.java, WebpDrawableTransformation(FitCenter()))
|
||||||
}
|
}
|
||||||
|
|
||||||
// animation is only supported without rounded corners
|
// animation is only supported without rounded corners and the file must be a GIF or WEBP.
|
||||||
if (animate && roundCorners == ROUNDED_CORNERS_NONE) {
|
// Glide doesn't support animated AVIF: https://bumptech.github.io/glide/int/avif.html
|
||||||
|
if (animate && roundCorners == ROUNDED_CORNERS_NONE && (path.isGif() || path.isWebP())) {
|
||||||
// this is required to make glide cache aware of changes
|
// this is required to make glide cache aware of changes
|
||||||
options.decode(Drawable::class.java)
|
options.decode(Drawable::class.java)
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue