Skip to content

Commit 4810b81

Browse files
Merging @aroth's PR react#1263 (Slow Rendering of CameraRoll images)
2 parents 4ca4509 + dfcb0a2 commit 4810b81

1 file changed

Lines changed: 1 addition & 10 deletions

File tree

Libraries/Image/RCTImageLoader.m

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,7 @@ + (void)loadImageWithTag:(NSString *)imageTag representation:(NSString *)rep cal
6666
@autoreleasepool {
6767
ALAssetRepresentation *representation = [asset defaultRepresentation];
6868
ALAssetOrientation orientation = [representation orientation];
69-
UIImage *image;
70-
71-
if( [rep isEqualToString:@"screen"] ){
72-
image = [UIImage imageWithCGImage:[representation fullScreenImage] scale:1.0f orientation:(UIImageOrientation)orientation];
73-
}else if( [rep isEqualToString:@"thumbnail"] ){
74-
image = [UIImage imageWithCGImage:[asset thumbnail] scale:1.0f orientation:(UIImageOrientation)orientation];
75-
}else{
76-
image = [UIImage imageWithCGImage:[representation fullResolutionImage] scale:1.0f orientation:(UIImageOrientation)orientation];
77-
}
78-
69+
UIImage *image = [UIImage imageWithCGImage:[representation fullResolutionImage] scale:1.0f orientation:(UIImageOrientation)orientation];
7970
dispatch_async(dispatch_get_main_queue(), ^{
8071
callback(nil, image);
8172
});

0 commit comments

Comments
 (0)