Advertisement
Guest User

Untitled

a guest
Oct 21st, 2014
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.81 KB | None | 0 0
  1. BitmapFactory.Options options=new BitmapFactory.Options();// Create object of bitmapfactory's option method for further option use
  2.            // options.inPurgeable = true; // inPurgeable is used to free up memory while required
  3.            // options.inSampleSize=3;
  4.             //options.inPreferredConfig = Config.RGB_565;
  5.             options.inJustDecodeBounds = false;
  6.             byte[] data = Base64.decode(currentProduct.getimage(), Base64.DEFAULT);
  7.             Log.d("image",data.toString());
  8.  
  9.             Bitmap bitmap1 = BitmapFactory.decodeByteArray(data ,0,data.length,options);//Decode image, "thumbnail" is the object of image file
  10.             Bitmap bitmap = Bitmap.createScaledBitmap(bitmap1, 25 , 25 , true);// convert decoded bitmap into well scalled Bitmap format.
  11.  
  12.             vh.myImage.setImageBitmap(bitmap);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement