animated-webp

Is it possible to get the new ImageDecoder class to return Bitmaps, one frame after another, manually?

感情迁移 提交于 2019-12-12 09:33:55
问题 Background I'm trying to go over bitmaps of animated GIF&WEBP files manually (frame by frame), so that it would work not just for Views, but on other cases too (such as a live wallpaper). The problem Animated GIF/WEBP files are supported only from Android P, using ImageDecoder API (example here) . For GIF, I wanted to try Glide for the task, but I've failed, so I've tried overcoming this, by using a library that allows to load them (here, solution here). I think it works fine. For WebP, I

Using Glide, how can I go over each frame of GifDrawable, as Bitmap?

瘦欲@ 提交于 2019-12-10 12:47:41
问题 Background In a live wallpaper, I have a Canvas instance that I wish to draw GIF/WEBP content into, which was loaded via Glide. The reason I wish to do it with Glide, is that it provides some advantages over a solution I've found in the past for the same thing (here , repository here) : Usage of Movie restricts me to just GIF. With Glide I could also support WEBP animation Usage of Movie seems inefficient as it doesn't tell me the time to wait between frames, so I have to choose FPS that I