EFPrefix / EFQRCode

A better way to operate QR Code in Swift, support iOS, macOS, watchOS and tvOS.
https://efprefix.github.io/EFQRCode
MIT License
4.58k stars 485 forks source link

生成二维码时,选择相册里的gif图作为水印图片,不能生成gif图片 #152

Open tc976562936 opened 1 year ago

tc976562936 commented 1 year ago

检查清单

问题描述

选择相册里的gif图作为水印图片,EFImage为normal成了普通照片

展开讲讲

在从相册里选择照片的didFinishPickingMediaWithInfo回调方法里, if let imageUrl = info[.referenceURL] as? URL, let asset = PHAsset.fetchAssets(withALAssetURLs: [imageUrl], options: nil).lastObject { images = selectedAlbumPhotosIncludingGifWithPHAssets(assets: [asset]) } asset为nil,images的count为0,导致不走底下的方法 if let tryGIF = images.first(where: { $0.value?.isGIF == true }) { watermark = tryGIF.value! }

重现步骤

xcode14.1 ios16.1.1 Swift5 EFQRCode6.2.1

其他信息

WeChat3fc0444585c6453b5b4746141b52b33c