mirror of
https://github.com/status-im/react-native.git
synced 2025-02-10 16:36:25 +00:00
Fix pixelated image in storyline
Reviewed By: seanxiao Differential Revision: D2563069 fb-gh-sync-id: 86fa47801c34669b7b0c2826e0e776717f5605dc
This commit is contained in:
parent
a859d9e931
commit
4036eca570
@ -58,17 +58,16 @@ RCT_EXPORT_MODULE()
|
|||||||
|
|
||||||
// Note: PhotoKit defaults to a deliveryMode of PHImageRequestOptionsDeliveryModeOpportunistic
|
// Note: PhotoKit defaults to a deliveryMode of PHImageRequestOptionsDeliveryModeOpportunistic
|
||||||
// which means it may call back multiple times - we probably don't want that
|
// which means it may call back multiple times - we probably don't want that
|
||||||
|
imageOptions.deliveryMode = PHImageRequestOptionsDeliveryModeHighQualityFormat;
|
||||||
|
|
||||||
BOOL useMaximumSize = CGSizeEqualToSize(size, CGSizeZero);
|
BOOL useMaximumSize = CGSizeEqualToSize(size, CGSizeZero);
|
||||||
CGSize targetSize;
|
CGSize targetSize;
|
||||||
if (useMaximumSize) {
|
if (useMaximumSize) {
|
||||||
targetSize = PHImageManagerMaximumSize;
|
targetSize = PHImageManagerMaximumSize;
|
||||||
imageOptions.resizeMode = PHImageRequestOptionsResizeModeNone;
|
imageOptions.resizeMode = PHImageRequestOptionsResizeModeNone;
|
||||||
imageOptions.deliveryMode = PHImageRequestOptionsDeliveryModeHighQualityFormat;
|
|
||||||
} else {
|
} else {
|
||||||
targetSize = size;
|
targetSize = size;
|
||||||
imageOptions.resizeMode = PHImageRequestOptionsResizeModeFast;
|
imageOptions.resizeMode = PHImageRequestOptionsResizeModeFast;
|
||||||
imageOptions.deliveryMode = PHImageRequestOptionsDeliveryModeFastFormat;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PHImageContentMode contentMode = PHImageContentModeAspectFill;
|
PHImageContentMode contentMode = PHImageContentModeAspectFill;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user