2015-05-17

[Android] 使用Picasso來解圖到Bitmap. Decode an Image to Bitmap by Picasso


This is how to decode an image to Bitmap by Picasso.

Picasso is a library for downloading and cashing image.
Reference:
http://square.github.io/picasso/



import android.graphics.Bitmap;
import com.squareup.picasso.Picasso;

String mImgUrl = "http://url.to.your.image.on.internet";
Bitmap bm = Picasso.with(mContext)
                        .load(mImgUrl)
                        .get();