Fresco12,324 stars Https://github.com/facebook/fresco
Facebook-produced, supportedAndroid 2.3 (Gingerbread) and aboveHe actually has a special Chinese document: https://www.fresco-cn.org/docs/index.html
Add dependency
//添加依赖
compile ‘com.facebook.fresco:fresco:1.2.0‘
//**************下面的依赖需要根据需求添加******************//
// 在 API < 14 上的机器支持 WebP 时,需要添加
compile ‘com.facebook.fresco:animated-base-support:1.2.0 '
// 支持 GIF 动图,需要添加
compile ‘com.facebook.fresco:animated-gif:1.2.0 '
// 支持 WebP (静态图+动图),需要添加
compile ‘com.facebook.fresco:animated-webp:1.2.0 '
compile ‘com.facebook.fresco:webpsupport:1.2.0 '
// 仅支持 WebP 静态图,需要添加
compile ‘com.facebook.fresco:webpsupport:1.2.0 '
Description on GitHub: Fresco is a powerful system for displaying images in Android applications.
Fresco takes care of the image loading and display, so you don't have to. It would load images from the network, local storage, or local resources, and display aplaceholderPlaceholder until the image has arrived.It has A levels of cache, one in memory and another in internal storage.
In Android 4.x and lower, Fresco puts images in a special Regionof Android memory. This lets your application run Faster-andsufferThe dreaded outofmemoryerror much less often.
Fresco also supports:
- Streaming of Progressive JPEGs
- Display of animated GIFs and webps
- extensive broad customization of image loading and display
- And much more!
Fresco supports many URI formats, but Fresco does not support the URI of the relative path. All URIs must be absolute paths, with the scheme of the URI. as follows:Type SCHEME ExampleRemote picture / http HttpURLConnection or refer to using other Network load ScenariosLocal file file:// FileInputStreamContentProvidercontent://resources under the Contentresolverasset directoryasset:// AssetmanagerResources under the Res directoryres:// Resources.openrawresourceSpecifies the picture data in the URIData:mime/type;base64 data type must conform to rfc2397 (only UTF-8 supported)
Summarize
- Pros: Support image progressive rendering, Large company produced, later maintenance is guaranteed
- Disadvantages: The frame volume is large, the size of the APK will increase around 3M; operation method is not particularly simple, there is a certain learning cost
- Features: Two levels of memory-level file caching mechanism, and has its own special memory area to handle the cache, avoid oom
Glide 14,408 stars Https://github.com/bumptech/glide
Google employees produced,Google's recommended image loading library, focusing on smooth scrolling
Add Dependency
repositories {
mavenCentral() // jcenter() works as well because it pulls from Maven Central
}
dependencies {
compile ‘com.github.bumptech.glide:glide:3.7.0‘
compile ‘com.android.support:support-v4:19.1.0‘
}
the introduction on GitHub:
An image loading and caching library for Android focused on smooth scrolling
Glide is a fast and efficient open sourceMedia ManagementandImage LoadingFramework for Android This wraps media decoding, memory and disk caching, and resource pooling into a simple and easy to u Se interface.
Glide Supportsfetching, decoding, and displayingVideo Stills, images, and animated GIFs. Glide includes aFlexibleAPI that allows developers to plug on to almost any network stack. By default Glide uses a customHttpURLConnectionBased stack, but also includes utility libraries plug on to Google ' sVolleyProject or Square ' sOkHttpLibrary instead.
Glide ' sPrimary The firstFocus is on making scrolling any kind of a list of images as smooth and fast as possible, but Glide was also effective for Almost any case where you need to fetch, resize, and display a remote image.
Summarize
- Advantages: Very fast loading speed, Small frame size, four hundred or five hundred KB
- Disadvantage: Because the mechanism choice is different, the speed is fast, but the picture quality is low, RGB565
- Features: Cache according to ImageView size, which means a picture may cache several different sizes depending on the display
Picasso 13,035 stars Https://github.com/square/picasso
Square, it's a long-time frame.
Add Dependency
compile ‘com.squareup.picasso:picasso:2.5.2‘
the introduction on GitHub is a word:
A powerful image downloading and caching library for Android
Advantages: High image quality disadvantage: Load Speed General Features: Only a full-size picture is cached, according to the size of the requirements of the compression conversion
Universal-image-loader 15,053 stars Https://github.com/nostra13/Android-Universal-Image-Loader
This, though, has been updated recently and does not provide gradle support, but it is still the most star image processing library
Jar package download powerful and flexible library for loading, caching and displaying images on Android.
Pros: Rich configuration options Disadvantages: Last maintenance at the end of 15, late there is a trend of non-maintenance, may be replaced by the current picture frame features: three-level caching strategy
Summary: If the picture quality requirements are not too high, personal recommendation Glide,Next recommended Fresco
Null
Comparison of commonly used Android image processing frameworks