private void processSavePicture(String directory) {
File file = new File(new StringBuilder()
.append(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES))
.append(File.separator)
.append(directory)
.append(File.separator)
.append(RESULT_FNAME_PREFIX)
.append(System.currentTimeMillis())
.append(PrefUtils.getImageFormatPref(getApplicationContext()))
.toString());
if (!file.getParentFile().exists()) {
file.mkdirs();
}
try {
presenter.saveResultPicture(new FileOutputStream(file),
((BitmapDrawable) ivResult.getDrawable()).getBitmap(),
PrefUtils.getImageQualityPref(getApplicationContext()));
presenter.setPath(file.getAbsolutePath());
} catch (IOException e) {
e.printStackTrace();
}
}
ResultActivity.java 文件源码
java
阅读 35
收藏 0
点赞 0
评论 0
项目:PXLSRT
作者:
评论列表
文章目录