mirror of
https://github.com/status-im/react-native-image-crop-picker.git
synced 2025-02-23 19:08:12 +00:00
(android) more efficient bitmap decoding
This commit is contained in:
parent
a892a7e432
commit
2b04e10b4f
@ -487,6 +487,9 @@ class PickerModule extends ReactContextBaseJavaModule implements ActivityEventLi
|
||||
private BitmapFactory.Options validateImage(String path) throws Exception {
|
||||
BitmapFactory.Options options = new BitmapFactory.Options();
|
||||
options.inJustDecodeBounds = true;
|
||||
options.inPreferredConfig = Bitmap.Config.RGB_565;
|
||||
options.inDither = true;
|
||||
|
||||
BitmapFactory.decodeFile(path, options);
|
||||
|
||||
if (options.outMimeType == null || options.outWidth == 0 || options.outHeight == 0) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "react-native-image-crop-picker",
|
||||
"version": "0.12.7",
|
||||
"version": "0.12.8",
|
||||
"description": "Select single or multiple images, with croping option",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user