Я пытаюсь создать CIColorClampFilter https://developer.apple.com/library/mac/documentation/GraphicsImaging/Reference/CoreImageFilterReference/index.html#//apple_ref/doc/filter/ci/CIColorClamp
В нем говорится, что я могу установить ключ для «inputMinComponents» как [0,0,0,0] или любые другие значения RGB, которые я хочу.
Но этот код:
filter = CIFilter(name:"CIColorClamp")
filter.setValue(ciImage, forKey: kCIInputImageKey)
filter.setValue([0,0,0,0], forKey: "inputMinComponents")
Вызывает эту ошибку:
CI internal error, type mismatch between kernel parameter 1 and argument
Я искал другие примеры CIColorClamp, но ничего не нашел.
Знаете ли вы, что не так со значением, которое я пытаюсь передать для ключа «inputMinComponents»?