How to make your Android display gif images

Source: Internet
Author: User

 

This is the unofficial official answer I found here: Issue 3422-android-Animated GIF not working in browser-Project Hosting on Google Code

If you want to work around this with your own Android build, you'll need to modify C ++ code, rebuild, and
Reflash your phone. You'll need to make two fixes to the released sources.

1) edit the function should_use_animated_gif () in
External/webkit/WebCore/platform/graphics/android/ImageSourceAndroid. cpp (around line 217). Return true
To animate gifs.

2) Change setRGBA () in/WebCore/platform/image-decoders/ImageDecoder. h (around line 173) to call
* Dest = SkPackARGB32 (a, r, g, B );
Instead
* Dest = (a <24 | r <16 | g <8 | B );

With these changes, gifs will animated correctly on large memory devices like Droid and Nexus One.

There's no code path for animating gifs in arbitrary applications like Gallery, counter t by rewriting it to host
WebView modded as described abve.


Author: pumpkin 5793

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.