mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-11-22 17:48:15 +00:00
ios, android, desktop: load JPEG, PNG, GIF and WebP image files (#7956)
This commit is contained in:
1 parent
1fd7ed8327
commit
5230eadbab
7 files changed
+94
-7
No files matched your search
+1
@@ -183,6 +183,7 @@ actual suspend fun getLoadedImage(file: CIFile?): Pair<ImageBitmap, ByteArray>?
|
||||
} else {
|
||||
File(getAppFilePath(file.fileName)).readBytes()
|
||||
}
|
||||
if (!isImageFile(data)) return null
|
||||
decodeSampledBitmapFromByteArray(data, 1000, 1000).asImageBitmap() to data
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, e.stackTraceToString())
|
||||
|
||||
Reference in new issue
Block a user