Comparison of three major image loading frameworks for Android

1. Which three images are loaded into the frame?
         1) Picasso     
         2)     Glide
         3)     Fresco
 
2. Introduction:
     Picasso  : Works best with Square's networking library, as Picasso has the option to hand off the caching part of network requests to the okhttp implementation.
    
     Glide : imitates Picasso's API, and adds a lot of extensions (such as gif support) on its basis. Glide's default Bitmap format is RGB_565, which is half the memory overhead of Picasso's default ARGB_8888 format; Picasso caches It is full size (only one cache is cached), while Glide caches the same size as ImageView (ie 56*56 and 128*128 are two caches).     
 
     FB's image loading framework Fresco : The biggest advantage is the bitmap loading below 5.0 (minimum 2.3). On systems below 5.0, Fresco puts images into a special memory area (Ashmem area). Of course, when the picture is not displayed, the occupied memory will be automatically released. This will make the app smoother and reduce OOM caused by image memory usage. Why is it said to be below 5.0, because after 5.0, the system is stored in the Ashmem area by default.
 
3. Summary:
         What Picasso can do, Glide can do, but the required settings are different. However, Picasso is much smaller than Glide. If the network request itself in the project uses okhttp or retrofit (the essence is still okhttp), then it is recommended to use Picasso, which will be much smaller (the work of the Square family bucket). The advantage of Glide is large picture streams, such as gif and Video. If you are doing video applications such as Meipai and Aipai, it is recommended to use it.
The memory optimization of Fresco below 5.0 is very good, but the price is that the volume is also very large, according to the volume Fresco>Glide>Picasso
However, it is also a little inconvenient to use (small suggestion: he can only use a built-in ImageView to achieve these functions, which is more troublesome to use. We usually change it according to Fresco and directly use his Bitmap layer)

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326396223&siteId=291194637