Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 tasks done
tc976562936 opened this issue Dec 19, 2022 · 0 comments
Open
2 tasks done

Comments

@tc976562936
Copy link

检查清单

  • 我已阅读 README.md,但没找到我需要的信息。
  • 我已查看 已知的问题,但没有相似的提问/请求。

问题描述

选择相册里的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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant