Android:Glide和Picasso

Glide: Google introduced us an  image loading library called  Glide , the author is bumptech. This library is widely used in Google's open source projects, including the official app released at the 2014 Google I/O Conference.

Picasso:  picasso is Square Open Source an Android graphics library cache, address http://square.github.io/picasso/ , you can achieve download pictures and caching

The loading methods of Glide and Picasso are basically similar.

Glide.with(context).load(load address).into(imageview control);

Picasso.with(context).load(load address).into(imageview control);

But Glide needs to rely on the v4 package. In addition to Context, Glide also accepts Activity and Fragment.

The difference between Glide and Picasso:

1. Different quality:

Glide loaded picture quality is worse than Picasso, because Glide default Bitmap format RGB_565 than the ARGB_8888memory overhead format is smaller by half.

2. Different memory

The memory overhead of Picasso is much greater than that of Glide. The reason is that Picasso loads a full-size image into the memory, and then allows the GPU to redraw the size in real time. The Glide loading size is the same as the ImageView size, so it is smaller.

3. Speed

Let Glide cache both the full size and other sizes,

The next time you load a picture in any ImageView, the full-size picture will be taken out of the cache, resized, and then cached.

The advantage of this way of Glide is that it loads and displays very quickly. The Picasso method causes some delays due to the need to resize before displaying, even if you add this code to make it display immediately.


Guess you like

Origin blog.csdn.net/u010256329/article/details/51834808