iOS 7.1 has more CoreImage filters than listed in docs (e.g. CIBumpDistortion and CIBumpDistortionLinear.) Can we use them?

StackOverflow https://stackoverflow.com/questions/22647660

  •  21-06-2023
  •  | 
  •  

문제

Core image has a public API for interrogating it for a list of supported filters, and asking for the parameters used to control those filters.

If you interrogate iOS 7.1, the list of filters returned includes a number of filters that are not shown in the current Core image Filter Reference.

Specifically, I'm looking at CIBumpDistortion and CIBumpDistortionLinear. The Core image Filter Reference lists those filters, but it only lists them as available in Mac OS.

Ordinarily, I would think that the extra filters would be considered private to the Core Image Framework, and therefore unavailable. However, as mentioned above, public methods like filterNamesInCategory and filterNamesInCategories are listing the filter names, the attributes and inputKeys are listed, and the filters (mostly) work when called. There are a few bugs, but that's tangential to the question.

I posted this question to the Apple developer boards hoping somebody from Apple would give a definitive answer, but nobody has replied yet. What do people here think?

도움이 되었습니까?

해결책

If they are listed in a query to [CIFilter filterNamesInCategory:kCICategoryBuiltIn], those CIFilters are safe to use. That's a publicly-available query, and shouldn't return any private Core Image filters.

This sounds like a case where the documentation hasn't quite caught up to what they've added, which I've seen with a couple of iOS updates. I might suggest filing a documentation bug to request that this be brought in line. I've done that before and they did update the documentation to match.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top