Created
September 7, 2025 10:47
-
-
Save root-ansh/3d2ac992d28198016814397bc6fb9796 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fun File.imageFileToBitmap(): Bitmap? { // wont work for content uri files. first create to local file | |
| val localNonSAFFile = this | |
| return if (localNonSAFFile.exists()) { | |
| BitmapFactory.decodeFile(localNonSAFFile.absolutePath) | |
| } else { | |
| null | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment