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

C7LookupFilter 有问题 #5

Closed
hydyy opened this issue Aug 15, 2022 · 2 comments
Closed

C7LookupFilter 有问题 #5

hydyy opened this issue Aug 15, 2022 · 2 comments

Comments

@hydyy
Copy link

hydyy commented Aug 15, 2022

C7LookupFilter 有问题, 图片会变蓝, 不知道怎么出现的

@hydyy hydyy closed this as completed Aug 15, 2022
@hydyy hydyy changed the title 最新版本 C7LookupFilter 有问题 C7LookupFilter 有问题 Aug 15, 2022
@hydyy hydyy reopened this Aug 15, 2022
@yangKJ
Copy link
Owner

yangKJ commented Aug 18, 2022

提供一下对照表和测试图,我测试一下看看
邮箱:ykj310@126.com

@hydyy
Copy link
Author

hydyy commented Aug 19, 2022

let imageSourceOptions = [kCGImageSourceShouldCache: false] as CFDictionary
let imageSource = CGImageSourceCreateWithURL(self as CFURL, imageSourceOptions)
let maxDimensionInPixels = maxPixels
let downsampleOptions = [kCGImageSourceCreateThumbnailFromImageAlways: true,
kCGImageSourceShouldCacheImmediately: true,
kCGImageSourceCreateThumbnailWithTransform: true,
kCGImageSourceThumbnailMaxPixelSize: maxDimensionInPixels] as CFDictionary
if let imageSource = imageSource,
let downsampledImage = CGImageSourceCreateThumbnailAtIndex(imageSource, 0, downsampleOptions) {
return UIImage(cgImage: downsampledImage)
}
else {
return nil
}

不好意思, 查到原因了,是因为做FIlter的图片是通过这个方式取的缩略图 就会变蓝

@yangKJ yangKJ closed this as completed Aug 22, 2022
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

2 participants