Drawable drawable = getResources()。getDrawable(R.drawable.im);
bitmap = ((BitmapDrawable)drawable).getBitmap();
ImagePath=MediaStore.Images.Media.insertImage(
getContentResolver(),
bitmap,
"mm",
"mm"
);
URI = Uri.parse(ImagePath);
Toast.makeText(MainActivity.this, ImagePath, Toast.LENGTH_LONG).show();