             } }
         }
         
-        fileprivate func blur(_ image: UIImage?, animated: Bool = true) {
+        fileprivate func blur(_ image: UIImage?, animated: Bool = true, duration: TimeInterval = 0.15) {
             guard !blured else { return }
             _blured = true
             if Thread.current.isMainThread {
-                __blur(image, animated: animated)
+                __blur(image, animated: animated, duration: duration)
             } else { DispatchQueue.main.async { [weak self] in
-                self?.__blur(image, animated: animated)
+                self?.__blur(image, animated: animated, duration: duration)
             } }
         }
         
-        fileprivate func unBlur(_ animated: Bool = true) {
+        fileprivate func unBlur(_ animated: Bool = true, duration: TimeInterval = 0.15) {
             guard blured else { return }
             _blured = false
             if Thread.current.isMainThread {
-                __blur(nil, animated: animated)
+                __blur(nil, animated: animated, duration: duration)
             } else { DispatchQueue.main.async { [weak self] in
-                self?.__blur(nil, animated: animated)
+                self?.__blur(nil, animated: animated, duration: duration)
             } }
         }
         
-        private func __blur(_ image: UIImage?, animated: Bool) {
+        private func __blur(_ image: UIImage?, animated: Bool, duration: TimeInterval = 0.15) {
             if image != nil || !animated {
                 _blur.image = image
             }
             if animated {
                 _blur.alpha = image == nil ? 1.0 : 0.0
-                UIView.animate(withDuration: 0.15, animations: { [unowned self] in
+                UIView.animate(withDuration: duration, animations: { [unowned self] in
                     self._blur.alpha = image == nil ? 0.0 : 1.0
                 }, completion: { [unowned self] (_) in
                     self._blur.alpha = 1.0

        
        UIDevice.current.beginGeneratingDeviceOrientationNotifications()
        NotificationCenter.default.addObserver(self, selector: #selector(_handleOrientationDidChange(_:)), name: .UIDeviceOrientationDidChange, object: nil)
        
        imagePickerController._captureDisplayQueue.async { [weak self] in
            guard let wself = self else { return }
            if !wself.imagePickerController._captureDisplayViews.contains(wself._captureDisplayView) {
                wself.imagePickerController._captureDisplayViews.append(wself._captureDisplayView)
            }
        }
    }
    
    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
    }
    
    override func viewDidAppear(_ animated: Bool) {

                    
                    wself._captureDisplayOutput.videoSettings = [kCVPixelBufferPixelFormatTypeKey as AnyHashable: kCVPixelFormatType_32BGRA]
                    wself._captureDisplayOutput.setSampleBufferDelegate(wself, queue: wself._captureDisplayQueue)
                    wself._captureDisplayOutput.alwaysDiscardsLateVideoFrames = true
                    
                    wself._captureSession = AVCaptureSession()
                    if wself._captureSession.canSetSessionPreset(AVCaptureSessionPresetPhoto) {
