user8387109
user8387109

Reputation:

How to disable Color Management in CoreImage

I want to disable Color management as described in the best performance Guide by Apple:

It says that I have to set null to the kCIImageColorSpace. As cifilter?.setValue("null", forKey: kCIImageColorSpace) didn't get me any results (App Crashed).

I read the documentation:

where it says that I have to specify the NSNull object as value. However cifilter?.setValue(NSNull(), forKey kCIImageColorSpace) also caused a crash:

Class is not key value coding compliant for the key CIImageColorSpace

What is the right command to do this?

Upvotes: 4

Views: 953

Answers (1)

l-l
l-l

Reputation: 3854

You need to set the color space when creating the CIContext not to the CIFilter. This is what I'm doing:

[CIContext contextWithOptions:@{kCIContextWorkingColorSpace : [NSNull null]}];

You should follow the link they posted at then end of the suggestion: Building Your Own Workflow with a Core Image Context

Upvotes: 5

Related Questions