Answers for "convert string to bitmap android"

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 string to bitmap android"

Browse Popular Code Answers by Language