fix things @Almouro has mentioned, thanks @Almouro
This commit is contained in:
parent
99563c8b32
commit
5f0bb88cef
|
@ -5,7 +5,6 @@ import android.content.ContentResolver;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.graphics.BitmapFactory;
|
import android.graphics.BitmapFactory;
|
||||||
import android.graphics.Matrix;
|
import android.graphics.Matrix;
|
||||||
import android.media.ThumbnailUtils;
|
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
|
@ -56,8 +55,6 @@ class ImageResizer {
|
||||||
return image;
|
return image;
|
||||||
}catch (IOException ex) {
|
}catch (IOException ex) {
|
||||||
// No memory available for resizing.
|
// No memory available for resizing.
|
||||||
}catch (OutOfMemoryError ex) {
|
|
||||||
// No memory available for resizing.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -44,7 +44,6 @@ RCT_EXPORT_METHOD(createResizedImage:(NSString *)path
|
||||||
|
|
||||||
[_bridge.imageLoader loadImageWithTag:path callback:^(NSError *error, UIImage *image) {
|
[_bridge.imageLoader loadImageWithTag:path callback:^(NSError *error, UIImage *image) {
|
||||||
if (error || image == nil) {
|
if (error || image == nil) {
|
||||||
UIImage* image;
|
|
||||||
if ([path hasPrefix:@"data:"] || [path hasPrefix:@"file:"]) {
|
if ([path hasPrefix:@"data:"] || [path hasPrefix:@"file:"]) {
|
||||||
NSURL *imageUrl = [[NSURL alloc] initWithString:path];
|
NSURL *imageUrl = [[NSURL alloc] initWithString:path];
|
||||||
image = [UIImage imageWithData:[NSData dataWithContentsOfURL:imageUrl]];
|
image = [UIImage imageWithData:[NSData dataWithContentsOfURL:imageUrl]];
|
||||||
|
|
Loading…
Reference in New Issue