Skip to content

Commit a9577dc

Browse files
committed
Set scale instead of generating at device resolution
1 parent 4d9cb70 commit a9577dc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ios/src/Compression.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ - (ImageResult*) compressImageDimensions:(UIImage*)image
5353
}
5454
CGSize newSize = CGSizeMake(newWidth, newHeight);
5555

56+
UIGraphicsImageRendererFormat *format = [UIGraphicsImageRendererFormat new];
57+
format.scale = 1;
5658
UIGraphicsImageRenderer *renderer = [[UIGraphicsImageRenderer alloc] initWithSize:newSize];
5759
UIImage *resizedImage = [renderer imageWithActions:^(UIGraphicsImageRendererContext * _Nonnull rendererContext) {
5860
[image drawInRect:CGRectMake(0, 0, newSize.width, newSize.height)];

0 commit comments

Comments
 (0)