我正在尝试控制亮度,如 Stack Overflow post 所示 使用 CIFilter CIToneCurve .
我收到这个错误:
Use of unresolved identifier 'kCIInputPoint0Key'
我在这里也找不到 key :Filter Parameter Keys
有没有人弄明白了?
最佳答案
从您在过滤器参数键上的链接(强调我的):
These keys represent some of the most commonly used input parameters. A filter can use other kinds of input parameters.
您需要做的是“硬编码”这些参数。例如:
let ciVector0 = CIVector(cgPoint: CGPoint(x: 0, y: 0))
filter.setValue(ciVector0, forKey: "inputPoint0")
您需要为这个过滤器的所有 5 个向量执行此操作。
关于swift - CIFilter key : kCIInputPoint0Key for CIToneCurve - Swift 3 & macOS 出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43976456/