Curzibn / Luban

Luban(鲁班)—Image compression with efficiency very close to WeChat Moments/可能是最接近微信朋友圈的图片压缩算法
Apache License 2.0
13.58k stars 2.25k forks source link

it is compress image error on Android10 #358

Open chenyusheng opened 5 years ago

chenyusheng commented 5 years ago

my devices is Xiaomi MI9,System version Android. i got a error when i use luban,like that:

E = /storage/emulated/0/DCIM/Screenshots/Screenshot_2019-10-21-11-38-06-025_com.sankuai.meituan.takeoutnew.jpg: open failed: EACCES (Permission denied)

i sure that i have grant the permision Read/Write Storage. it somebody can help me?

wanYin2g commented 5 years ago

i meet the same question. you should get the Uri of the Image

zhepEric commented 4 years ago

AndroidManifest.xml 中 配置requestLegacyExternalStorage属性 android:requestLegacyExternalStorage="true"

Mian-Zaid commented 3 years ago

my devices is Xiaomi MI9,System version Android. i got a error when i use luban,like that:

E = /storage/emulated/0/DCIM/Screenshots/Screenshot_2019-10-21-11-38-06-025_com.sankuai.meituan.takeoutnew.jpg: open failed: EACCES (Permission denied)

i sure that i have grant the permision Read/Write Storage. it somebody can help me?

How did you solved this error i am also having this error. Reply ASAP

a8453770 commented 9 months ago

image private fun getAppSpecificDir(context: Context): File? { return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { context.getExternalFilesDir(Environment.DIRECTORY_PICTURES) } else { context.getExternalFilesDir(null) } }