gpt4 book ai didi

java - 如何将压缩图像保存在新文件夹中

转载 作者:行者123 更新时间:2023-12-02 09:58:09 26 4
gpt4 key购买 nike

Compressor.getDefault(this)
.compressToFileAsObservable(actualImage)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Action1 < File > () {
@Override
public void call(File file) {
compressedImage = file;
}
}, new Action1 < Throwable > () {
@Override
public void call(Throwable throwable) {
showError(throwable.getMessage());
}
});

图片压缩后不会显示在我的存储中,我的图片保存路径是:

/data/user/0/com.example.compressor/cache:Compressor/IMG_20190421_111936.jpeg

我想将图像保存在手机存储中。

最佳答案

您不能在文件路径中使用 :

关于java - 如何将压缩图像保存在新文件夹中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55842407/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com