【发布时间】:2019-05-09 18:56:05
【问题描述】:
所以我有一个位图,现在我想将其转换为 imageUri(或字符串), 我在这里使用此代码,但它只是不起作用,而不是返回 imageUri 它返回一个长的随机文本。
这是我的代码:
ByteArrayOutputStream baos = new ByteArrayOutputStream();
saveBitmap.compress(Bitmap.CompressFormat.JPEG, 75, baos);
String path = Base64.encodeToString(baos.toByteArray(),Base64.DEFAULT);
【问题讨论】:
-
那是你图片的base64编码版本。你为什么期待“imageUri”?
-
我怎样才能得到..从位图中的图像uri...你能告诉我吗?