Picture will talk series of Android picture cache frame

Source: Internet
Author: User

Preface: Read a lot of wonderful articles, the author writes very well, but always feel that the text description is not a picture or diagram of the intuitive, because the picture can be abstracted into concrete. Language is regional, and pictures are universal, even if the language is not through, but can be understood through the picture. So want to do a series of simple blog, the content is a picture with some necessary instructions, so you can quickly grasp the focus, and do not need to do too much reading, you can understand the framework of things. Some of the pictures involved may come from the official website, some from the famous bloggers, or their own drawings, will be one by one instructions.

Cut to the chase, first of all,:

From:https://github.com/nostra13/Android-Universal-Image-Loader

This is the image processing flowchart of the famous open Source Library Android-universal-image-loader.


Brief description:

1. The image cache is divided into two parts: Memory cache and Disk cache.

2. When the picture is displayed, it is read from the memory cache first, and if it is found in the memory cache, the picture is displayed directly.

3. If the memory cache is not present, the disk cache is looked up, if found, it is encoded as Bitmap, then the picture is preprocessed, cached to memory, and the picture is finally displayed.

4. If neither the memory cache nor the disk cache are found, download the image, cache it to disk after downloading, then encode it as Bitmap, pre-preprocess the picture, cache it to memory, and then display the picture.

The Android picture cache frame has many, the principle all is similar, basically all is above logic, everybody may extrapolate, or writes own picture cache frame according to the above process.


Picture will talk series of Android picture cache frame

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.