You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm aware that the WebpDrawableTransformation class has an unstable warning in the code comment, but transformations are required for my use case, so I looked into this.
The problem has nothing to do with the WebpDrawableTransformation class itself, but is caused by the way WebpDecoder handles its frame bitmap cache.
When transformations are applied, the original bitmap returned by WebpDecoder#getNextFrame() might be put back into the bitmap pool, and shouldn't be used any more. But in the getNextFrame() method, it's also cached into mFrameBitmapCache and used later, which is why the result looks broken.
I have a fix that caches a new copy of the bitmap into the frame cache and solves the problem. I will create a pull request soon.
@alvingao This is a known issue. Thanks for your investigation and solution. I have verified your PR and it works fine. I will merge it into the respository.
When applying transformations to some animated WebP images, the result animation looks broken.
For example, with the following code:
The result looks like this:
Without applying transformations, the images are ok and the animation looks perfect.
The text was updated successfully, but these errors were encountered: