     // MARK: Capture Image
 
     public var isCapturingImage: Bool {
-        imageOutput.isCapturingStillImage || isSilentCapturingImage
+        stillImageOutput.isCapturingStillImage || isSilentCapturingImage
     }
 
     public var captureLimitSize: CGSize = .zero

                }
            }

            // imageOutput と videoOutput の videoOrientation を InterfaceOrientation に揃えるか縦にしておく。
            // captureSession に addInput した後じゃないと connection は nil なので videoOrientation を取ろうとすると nil アクセスで死にます。
            // デフォルトでは imageOutput が 1 (portrait) で videoOutput が 3 (landscapeRight)
            // let videoOrientation = AVCaptureVideoOrientation(interfaceOrientation: UIApplication.shared.statusBarOrientation) ?? .portrait
            // とりあえず portrait に戻す
            let videoOrientation = AVCaptureVideoOrientation.portrait
            if let imageOutputConnection = imageOutput.connection(with: AVMediaType.video) {
                if imageOutputConnection.isVideoOrientationSupported {
                    imageOutputConnection.videoOrientation = videoOrientation
                }
                imageOutputConnection.videoScaleAndCropFactor = 1.0
            }
            if let videoOutputConnection = videoOutput.connection(with: AVMediaType.video) {
                if videoOutputConnection.isVideoOrientationSupported {

                }

                let metadata = CMCopyDictionaryOfAttachments(allocator: nil, target: imageDataBuffer, attachmentMode: kCMAttachmentMode_ShouldPropagate) as? [String: Any]
                let mirrored = self.isMirroredImageIfFrontCamera && stillImageOutputCaptureConnection.isFrontCameraDevice
                let image = mirrored ? scaledImage.mirrored : scaledImage
                onMainThreadAsync {
                    completion(image, metadata)
