Merge pull request #548 from DavidBertet/task/fix_png_ios_simulator
Fix #517. iOS simulator pictures are PNG instead of JPEG
This commit is contained in:
commit
815730ed94
@ -597,7 +597,7 @@ RCT_ENUM_CONVERTER(CKCameraZoomMode, (@{
|
||||
if (self.mockPreview != nil) {
|
||||
UIImage *previewSnapshot = [self.mockPreview snapshotWithTimestamp:YES]; // Generate snapshot from main UI thread
|
||||
dispatch_async( self.sessionQueue, ^{ // write image async
|
||||
[self writeCapturedImageData:UIImagePNGRepresentation(previewSnapshot) onSuccess:onSuccess onError:onError];
|
||||
[self writeCapturedImageData:UIImageJPEGRepresentation(previewSnapshot, 0.85) onSuccess:onSuccess onError:onError];
|
||||
});
|
||||
} else {
|
||||
onError(@"Simulator image could not be captured from preview layer");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user