问题描述
public void saveImage() { 字符串文件名 = "pikasso" + System.currentTimeMillis();
ContentValues values = new ContentValues();
values.put(MediaStore.Images.Media.TITLE,filename);
values.put(MediaStore.Images.Media.DATE_ADDED,System.currentTimeMillis());
values.put(MediaStore.Images.Media.MIME_TYPE,"image/jpg");
//get a URI for the location to save the file
Uri uri = getContext().getContentResolver().insert(MediaStore.Images.Media.INTERNAL_CONTENT_URI,values);
try {
OutputStream outputStream = getContext().getContentResolver().openOutputStream(uri);
//copy the bitmap to the output stream
bitmap.compress(Bitmap.CompressFormat.JPEG,100,outputStream); //this is our image
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)