Back to project page AndroidCouponAssistant.
The source code is released under:
MIT License
If you think the Android project AndroidCouponAssistant listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.corylucasjeffery.couponassistant; //from w w w . j a v a 2s. co m import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.AsyncTask; import android.util.Base64; import android.widget.ImageView; public class BlobtoBMP extends AsyncTask<String, String, Bitmap>{ private ImageView iv; private String imageBlob; private Bitmap image; public BlobtoBMP(ImageView iv, String image) { this.imageBlob = image; this.iv = iv; } @Override protected Bitmap doInBackground(String... strings) { byte[] decodeByte = Base64.decode(this.imageBlob, 0); image = BitmapFactory.decodeByteArray(decodeByte, 0, decodeByte.length); return null; } @Override protected void onPostExecute(Bitmap bitmap) { super.onPostExecute(bitmap); iv.setImageBitmap(image); } }