Projects. Ideas. Edge.

Single post

Picasso: Square’s Image Library for Android

For those that are developing Android applications and are dealing with image loading and optimization issues, you may want to look into Square’s open-source image library, Picasso.

Picasso is a powerful open-source image library for the Android platform. It provides a way for Android developers to load images into their app quickly, without having to take much effort in terms of coding. As those familiar to Android development know, loading and effectively optimizing memory space for images can be quite a challenge, given the cumbersome way of having to set up an ImageView object, referencing it, loading an image source into it, and ultimately having to recycle it to free up memory for other objects in your app. This would often require several lines of code, as well as adding in the bulky AsyncTask code from Google Developer SDK site if threading. With the Picasso library, this removes all of that, and simplifies it into a single line of code. For example:

ImageView imageView = (ImageView) findViewById(R.id.main);
Bitmap

Picasso.with(context).load(picture).into(imageView)

Jake Wharton, a developer working for Square (the e-commerce business, not Square-Enix), has developed several awesome open-source libraries for Android including Picasso.

Write a Comment