Friday, 23 August 2013

Android: Modify algorithm to resize .gif images

Android: Modify algorithm to resize .gif images

I have been trying to display every kind of gif images in android. I don't
want to use the Movie class nor WebView, this is because I need display
any kind of gif images. I finally found a class that does exactly that I
want (GifDecoder.java). The only problem is that if the image resolution
is too big, this will take a lot of time to decode it. Currently I'm using
a bitmap disk cache to improve the performance and I'm making the decoding
the gif images in a service in background. But still, this takes a lot of
time. Someone have an idea of how modify the algorithm to skip some frames
or read the gif to an smaller bitmap?. The thing that I need change is in
the readBitmap method in the readContents method.

No comments:

Post a Comment