uriToBitmap改为使用RGB_565
This commit is contained in:
@@ -14,8 +14,8 @@ object ImageUtil {
|
|||||||
// options.inPreferredConfig = Bitmap.Config.ARGB_8888
|
// options.inPreferredConfig = Bitmap.Config.ARGB_8888
|
||||||
options.inPreferredConfig = Bitmap.Config.RGB_565
|
options.inPreferredConfig = Bitmap.Config.RGB_565
|
||||||
context.contentResolver.openInputStream(uri)?.use { stream ->
|
context.contentResolver.openInputStream(uri)?.use { stream ->
|
||||||
// BitmapFactory.decodeStream(stream, null, options)
|
BitmapFactory.decodeStream(stream, null, options)
|
||||||
BitmapFactory.decodeStream(stream)
|
// BitmapFactory.decodeStream(stream)
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
e.printStackTrace()
|
e.printStackTrace()
|
||||||
|
|||||||
Reference in New Issue
Block a user