Hi there, I'm having trouble with Glide for Jetpack Compose (https://google.github.io/accompanist/glide/). It works really well when loading remote images but when loading local images (PNG) they sometimes get a black background. The weirdest part is that for the exact same image I have the issue on some view and not on others. Any idea what could go wrong ?
MaxUt
06/03/2021, 4:34 PM
Function is use to store the image locally :
Copy code
fun saveImageToFileSystem(bitmap: Bitmap, name: String) {
val dir = context.getDir(LOCAL_IMAGES_FOLDER, Context.MODE_PRIVATE)
val image = File(dir, name)
FileOutputStream(image).use {
bitmap.compress(Bitmap.CompressFormat.PNG, 80, it)
it.flush()
it.close()
}
}