Create a Bitmap/Drawable from file path

后端 未结 6 1090
故里飘歌
故里飘歌 2020-11-28 06:56

I\'m trying to create a Bitmap or Drawable from existing file path.

String path = intent.getStringExtra(\"FilePath\");
BitmapFactory.Options option = new Bit         


        
6条回答
  •  一向
    一向 (楼主)
    2020-11-28 07:54

    here is a solution:

    Bitmap bitmap = BitmapFactory.decodeFile(filePath);
    

提交回复
热议问题