glide icon indicating copy to clipboard operation
glide copied to clipboard

Is there any possibility to change speed of GIF

Open Mouadabdelghafouraitali opened this issue 2 years ago • 0 comments

I'm trying to change the speed of a loaded GIF by Glide :

Glide.with(recordroo.this)
     .asGif().load(outputPath)
     .listener(new RequestListener<GifDrawable>() {
               @Override
               public boolean onLoadFailed(@Nullable GlideException e, Object model, Target<GifDrawable> target, boolean isFirstResource) {
                     return false;
               }

               @Override
               public boolean onResourceReady(GifDrawable resource, Object model, Target<GifDrawable> target, DataSource dataSource, boolean isFirstResource) {
                      return false;
               }
       }).into(userGifView);

I tried the following :

Drawable userDrawable = userGifView.getDrawable();
 if (userDrawable instanceof Animatable) {
      ((Animatable) userDrawable).; //no speed method exists.
 }

Drawable userDrawable = userGifView.getDrawable();
 if (userDrawable instanceof GifDrawable) {
      ((GifDrawable) userDrawable).; //no speed method exists.
 }

But there's no speed method to use.

Mouadabdelghafouraitali avatar Jun 10 '22 12:06 Mouadabdelghafouraitali