 
         switch titleCurrent {
         case "watermark":
-            watermark = EFImage(finalImage)
+            if let finalImage = finalImage {
+                watermark = .normal(finalImage)
+            } else {
+                watermark = nil
+            }
             
-            var images = [EFImage]()
+            var images = [Ref<EFImage?>]()
             if let imageUrl = info[.referenceURL] as? URL,
                 let asset = PHAsset.fetchAssets(withALAssetURLs: [imageUrl], options: nil).lastObject {
                 images = selectedAlbumPhotosIncludingGifWithPHAssets(assets: [asset])
             }
-            if let tryGIF = images.first(where: { $0.isGIF }) {
-                watermark = tryGIF
+            if let tryGIF = images.first(where: { $0.value?.isGIF == true }) {
+                watermark = tryGIF.value!
             }
         case "icon":
             icon = finalImage

                guard self != nil else { return }
                print("dataUTI: \(dataUTI ?? "")")

                let imageElement = EFImage()

                if kUTTypeGIF as String == dataUTI {
                    // MARK: GIF
                    imageElement.isGIF = true

                    if nil != imageData {
                        imageElement.data = imageData
                    }
                } else {
                    // MARK: 其他格式的图片，直接请求压缩后的图片
                    imageElement.isGIF = false

                    imageManager.requestImage(for: asset, targetSize: targetSize, contentMode: .aspectFill, options: options) {
                        [weak self] (result, info) in
                        guard self != nil,
                            let isDegraded = info?[PHImageResultIsDegradedKey] as? Bool,
                            !isDegraded
                            else { return }
                        // 得到一张 UIImage，展示到界面上
                        imageElement.data = result
                    }
                }


        generator.setBinarizationThreshold(binarizationThreshold: binarizationThreshold)
        generator.setPointShape(pointShape: pointShape)

        switch watermark {
        case .gif(let data)?: // GIF
            generator.setWatermark(watermark: nil, mode: watermarkMode)
            
            if let afterData = EFQRCode.generateWithGIF(data: data, generator: generator) {
                present(ShowController(image: .gif(afterData)), animated: true)
            } else {
                let alert = UIAlertController(title: "Warning", message: "Create QRCode failed!", preferredStyle: .alert)
                alert.addAction(UIAlertAction(title: "OK", style: .cancel))
                present(alert, animated: true)
            }
        case .normal(let image)?:
            generator.setWatermark(watermark: UIImage2CGimage(image), mode: watermarkMode)
            fallthrough // Other use UIImage
        default:
            if let tryCGImage = generator.generate() {
                let tryImage = UIImage(cgImage: tryCGImage)
                present(ShowController(image: .normal(tryImage)), animated: true)
            } else {
                let alert = UIAlertController(title: "Warning", message: "Create QRCode failed!", preferredStyle: .alert)
                alert.addAction(UIAlertAction(title: "OK", style: .cancel))
