イメージビューで画像を表示しようとしています。で画像パスを渡すことで実行できることを知っていますsetImageBitmap()
。
もうやった。内部の問題により、エミュレータのパフォーマンスが低下したため、エミュレータをGoogleからIntel x86に変更しました。その時点から、画像に関連するアプリケーションが正しく動作しません。イメージビューでの画像の表示に関して何か問題はありますか?
画像表示のコード スニペット:
try
{
path = info.getPath(); //this variable contains the filename of the image.
File sdCardPath = Environment.getExternalStorageDirectory(); // code to get the path of the folder storing the image file
Bitmap bitmap = BitmapFactory.decodeFile(sdCardPath+"/DCIM/Camera/SAMPLE IMAGES/"+path);
jpgView.setImageBitmap(bitmap);
Toast.makeText(getApplicationContext(), "This is reg pic : "+sdCardPath+"/DCIM/Camera/SAMPLE IMAGES/"+path, Toast.LENGTH_SHORT).show(); }
catch(NullPointerException er)
{
String ht=er.toString();
Toast.makeText(getApplicationContext(), ht, Toast.LENGTH_SHORT).show();
}
画像ファイルは次のように保存されます -