ギャラリーから画像を検索しています。表示しました。画像をonDraw(Canvas canvas)
に表示したいのですが、どうすればいいですか。 事前のおかげでここuri画像をキャンバスondrawメソッドに変換する方法
selectedImageUri = data.getData();
selectedImagePath = getPath(selectedImageUri);
Toast.makeText(getBaseContext(),"selected"+selectedImagePath,Toast.LENGTH_LONG).show();
System.out.println("Image Path : " + selectedImagePath);
img.setImageURI(selectedImageUri);
URI selectedImageUri。
マイOnDraw(canvas Canvas)
コード:
Bitmap myBitmap1 = BitmapFactory.decodeResource(getResources(),selectedImageUri);
BitmapFactoryは、引数には適用されませんタイプ(リソース、ウリ)
で私のエラーメッセージ方法decodeResource(資源、int型)