Answers for "convert bitmap to image android studio"

0

get bitmap from imageview

Bitmap bm=((BitmapDrawable)imageView.getDrawable()).getBitmap();
Posted by: Guest on December-28-2020
0

convert string to bitmap android

Bitmap b=StringToBitMap(Qrimage);
imgg.setImageBitmap(b);      

public Bitmap StringToBitMap(String image){
           try{
               byte [] encodeByte=Base64.decode(image,Base64.DEFAULT);

               InputStream inputStream  = new ByteArrayInputStream(encodeByte);
               Bitmap bitmap  = BitmapFactory.decodeStream(inputStream);
               return bitmap;
             }catch(Exception e){
               e.getMessage();
              return null;
             }
     }
Posted by: Guest on March-24-2021

Code answers related to "convert bitmap to image android studio"

Browse Popular Code Answers by Language