[android] UriからBitmapを作成する
UriからBitmapを作成する
UriからBitmapを作成するには下記の通り
try { Bitmap bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), uri); }catch (IOException e) { e.printStackTrace(); }
*MediaStore.Images.Media.getBitmapはIOExceptionの判定が必要なのでtry/catchを実装しておく