bumptech / bumptech/glide

How to resize and save the Gif file in glide v4 ? (not for displaying)

Open
#4,764 0 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

**Issue details**:
I want to resize the gif image with 512x512 to send it to whatsapp as animated sticker.
I tried all frequently used code snippets on forums but none of them worked for gif.

**Glide**:
```java
Glide.with(context)
.asFile()
.load(src)
.apply(new RequestOptions()
.format(DecodeFormat.PREFER_ARGB_8888)
.override(512,512)) // No effect
.into(new Target() {
@Override
public void onResourceReady(@NonNull File resource, @Nullable Transition transition) {
storeImage(resource);
}
});
```

**build.gradle**
```gradle
implementation 'com.github.bumptech.glide:glide:4.13.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.13.0'
```
**Glide Version**: 4.13.0
**Device/Android Version**: Android 10 - Redmi Note 7 Pro

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.