lxy před 1 rokem
rodič
revize
9add893823

+ 49 - 18
LenzCameraNativeModuleForRN/Classes/inner/PCSBaseViewController/PCSBaseViewController.m

@@ -933,7 +933,7 @@
 //                            NSLog(@"~~~~~~~~~~~~~~~  左");
                             [wearSelf.panoramaGuideView updateArrowWith:PanoramaArrowDirLeft dir:dir];
                         } else {
-//                            NSLog(@"~~~~~~~~~~~~~~~  右");
+//                            NSLog(@"~~~~~~~~~~~s~~~~  右");
                             [wearSelf.panoramaGuideView updateArrowWith:PanoramaArrowDirRight dir:dir];
                         }
                     }
@@ -2613,6 +2613,7 @@
     UIImage *image = [[UIImage alloc] initWithData:data];
 
     UIImage *saveImage = [self rotateImageWith:image];
+    
     data = UIImageJPEGRepresentation(saveImage, 1);
     NSString *path = [LenzDataManager saveImageWith:data mode:self.mode];
     LenzResourceItemModel *itemModel = [[LenzResourceItemModel alloc]init];
@@ -3039,11 +3040,7 @@
             } else {
                 dirction = LenVideoStitchDirctionAny;
             }
-//            PanoramaOrientationViewAny,
-//            PanoramaOrientationViewUp,
-//            PanoramaOrientationViewRight,
-//            PanoramaOrientationViewLeft,
-//            PanoramaOrientationViewDown,
+
             [LenStitcher videoStitchWith:sampleBuffer
                                 dirction:dirction
                                   isStop:self.isVideoStitchStopedWhenRecording
@@ -3231,20 +3228,54 @@
     if (self.currentTgDirection == TgDirectionPortrait) {
         return image;
     } else if (self.currentTgDirection == TgDirectionLeft) {
-        UIImage * portraitImage = [[UIImage alloc]initWithCGImage: image.CGImage
-                                                             scale: 1.0
-                                                       orientation: UIImageOrientationLeft];
-        return portraitImage;
+        
+        OperationNodeAIPanorama *aiPan = nil;
+        if ([self.currentOperationNode isKindOfClass:[OperationNodeAIPanorama class]]) {
+            aiPan = self.currentOperationNode;
+        }
+        
+        if (self.mode == SDK_CAPTURE_MODE_PANORAMA || (aiPan && aiPan.AIType == OperationAITypeLongPress)) {
+            image = [[UIImage alloc]initWithCGImage:image.CGImage
+                                                                 scale:1.0
+                                                           orientation:UIImageOrientationLeft];
+        } else {
+            image = [[UIImage alloc]initWithCGImage:image.CGImage
+                                                                 scale:1.0
+                                                           orientation:UIImageOrientationUp];
+        }
+
+        return image;
     } else if (self.currentTgDirection == TgDirectionRight) {
-        UIImage * portraitImage = [[UIImage alloc]initWithCGImage: image.CGImage
-                                                             scale: 1.0
-                                                       orientation: UIImageOrientationRight];
-        return portraitImage;
+        OperationNodeAIPanorama *aiPan = nil;
+        if ([self.currentOperationNode isKindOfClass:[OperationNodeAIPanorama class]]) {
+            aiPan = self.currentOperationNode;
+        }
+        if (self.mode == SDK_CAPTURE_MODE_PANORAMA || (aiPan && aiPan.AIType == OperationAITypeLongPress)) {
+            image = [[UIImage alloc]initWithCGImage:image.CGImage
+                                                                 scale:1.0
+                                                           orientation:UIImageOrientationRight];
+        } else {
+            image = [[UIImage alloc]initWithCGImage:image.CGImage
+                                                                 scale:1.0
+                                                           orientation:UIImageOrientationDown];
+        }
+        return image;
     } else if (self.currentTgDirection == TgDirectionDown) {
-        UIImage * portraitImage = [[UIImage alloc]initWithCGImage: image.CGImage
-                                                             scale: 1.0
-                                                       orientation: UIImageOrientationDown];
-        return portraitImage;
+        OperationNodeAIPanorama *aiPan = nil;
+        if ([self.currentOperationNode isKindOfClass:[OperationNodeAIPanorama class]]) {
+            aiPan = self.currentOperationNode;
+        }
+        if (self.mode == SDK_CAPTURE_MODE_PANORAMA || (aiPan && aiPan.AIType == OperationAITypeLongPress)) {
+            image = [[UIImage alloc]initWithCGImage:image.CGImage
+                                                                 scale:1.0
+                                                           orientation:UIImageOrientationDown];
+        } else {
+            image = [[UIImage alloc]initWithCGImage:image.CGImage
+                                                                 scale:1.0
+                                                           orientation:UIImageOrientationLeft];
+        }
+        return image;
+
     }
     
     return image;

+ 0 - 1
LenzCameraNativeModuleForRN/Classes/inner/UI/PanoramaGuideView/PanoramaGuideView.m

@@ -481,7 +481,6 @@ CGFloat const PanoramaGuideViewWOrH = 120;
             self.offSetLeft = @((120-38)/2);
         }
         
-        NSLog(@"1111111111111111111&&&&:     %f", self.offSetTop.doubleValue);
 
         self.showImageView.image = image;
         [UIView animateWithDuration:.15 animations:^{