Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image model does not include the path variable #149

Open
mehrdadnoruzy opened this issue Nov 28, 2022 · 1 comment
Open

Image model does not include the path variable #149

mehrdadnoruzy opened this issue Nov 28, 2022 · 1 comment

Comments

@mehrdadnoruzy
Copy link

mehrdadnoruzy commented Nov 28, 2022

Thank you for updating the library to kotlin version, because in the previous java version it took 30 seconds to load images in the ImagePickerActivity :-)

I have a problem with Image model. It does not include the "path" variable ( "image.path" does not exist ), In the previous java version, this was available in the class, but unfortunately it has been removed in the new kotlin version

I need something like this :
https://github.com/esafirm/android-image-picker/blob/2.x/imagepicker/src/main/java/com/esafirm/imagepicker/model/Image.kt

I need this format :
/storage/emulated/0/Download/example.jpg

But I got this format from " image.uri.path " :
/external_primary/images/media/118595

And I got into trouble because of this. :-(

Is it possible to update the library?

Thanks

@Nukano
Copy link

Nukano commented Dec 27, 2022

I am in the same case as you. I needed the previous PATH format to create the Bitmap because I was getting FileNotFound error but with this code I solve it.

val inputStream: InputStream? = applicationContext.contentResolver.openInputStream(image.uri)
val bm :Bitmap = BitmapFactory.decodeStream(inputStream)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants