mirror of
https://github.com/status-im/react-native-camera.git
synced 2026-08-31 05:31:07 +00:00
Merge pull request #1123 from ryd0rz/master
setup viewport size before using.
This commit is contained in:
@@ -633,6 +633,9 @@ RCT_EXPORT_METHOD(hasFlash:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRej
|
||||
// create cgimage
|
||||
CGImageRef cgImage = CGImageSourceCreateImageAtIndex(source, 0, NULL);
|
||||
|
||||
// setup viewport size before using
|
||||
CGSize viewportSize;
|
||||
|
||||
// Rotate it
|
||||
CGImageRef rotatedCGImage;
|
||||
if ([options objectForKey:@"rotation"]) {
|
||||
@@ -664,7 +667,6 @@ RCT_EXPORT_METHOD(hasFlash:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRej
|
||||
|
||||
// Crop it
|
||||
if (self.cropToPreview) {
|
||||
CGSize viewportSize;
|
||||
|
||||
if (UIInterfaceOrientationIsPortrait([[UIApplication sharedApplication] statusBarOrientation]))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user