Fresco of Android image processing

Source: Internet
Author: User

First, about Fresco

Github:https://github.com/facebook/fresco

Api:http://www.fresco-cn.org/javadoc/reference/packages.html


Fresco is a powerful picture loading component.

The Fresco is designed with a module called Image pipeline. It is responsible for loading images from the network, from the local file system, local resources. To maximize space and CPU time, it contains a level 3 cache design (level 2 memory, Level 1 files).

The Fresco design has a drawees module that conveniently displays the loading diagram, freeing up memory and space consumption when the picture is no longer displayed on the screen.

Fresco supports Android2.3 (API level 9) and above systems.

Second, the characteristics

Progressive rendering of images

Progressive JPEG image format has been popular for several years, progressive picture format first presents a rough outline of the picture, and then as the picture continues to download, showing a gradually clear picture, which for mobile devices, especially slow network has great positive, can bring a better user experience.

The image Library of Android itself does not support this format, but fresco supports it. When used, as always, just need to provide a picture of the URI, the rest of the matter, fresco will handle.

GIF graphs and WEBP formats

Yes, support for loading GIF graph, support WEBP format.

Rendering of images

Fresco's drawees design brings some useful features:

    • Customize Center focus (very helpful for displaying pictures such as faces)
    • Fillet chart, of course the circle is OK.
    • After the download fails, click reproduce download
    • Custom placeholder bitmap, custom overlay, or progress bar
    • Specify the overlay when the user presses
Loading of images

Fresco's image pipeline design allows users to control the loading of images in multiple ways:

    • Specify a different remote path for the same picture, or use a picture that already exists in the local cache
    • Show a low-resolution image first, and then display high-definition image after download
    • Load completion callback Notification
    • For this map, if you have an EXIF thumbnail, you can display the thumbnail before the large map loading is complete.
    • Zoom or rotate a picture
    • Process a downloaded picture
    • WebP Support
Iii. examples

1. Load network pictures using fresco

Fresco of Android image processing

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.