Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- BitmapFactory.Options options=new BitmapFactory.Options();// Create object of bitmapfactory's option method for further option use
- // options.inPurgeable = true; // inPurgeable is used to free up memory while required
- // options.inSampleSize=3;
- //options.inPreferredConfig = Config.RGB_565;
- options.inJustDecodeBounds = false;
- byte[] data = Base64.decode(currentProduct.getimage(), Base64.DEFAULT);
- Log.d("image",data.toString());
- Bitmap bitmap1 = BitmapFactory.decodeByteArray(data ,0,data.length,options);//Decode image, "thumbnail" is the object of image file
- Bitmap bitmap = Bitmap.createScaledBitmap(bitmap1, 25 , 25 , true);// convert decoded bitmap into well scalled Bitmap format.
- vh.myImage.setImageBitmap(bitmap);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement