how i apply CIToneCurve filter i applied
filter= [CIFilter filterWithName:@"CIScreenBlendMode"];
[filter setValue:beginImage1 forKey:kCIInputImageKey];
[filter setValue:beginImage forKey:@"inputBackgroundImage"];
different filters with this approach now i want to apply CIToneCurve how should i apply this with these parameters
inputImage
A CIImage class whose display name is Image.
inputPoint0
A CIVector class whose attribute type is CIAttributeTypeOffset and whose display name is Point 1. Default value: [0, 0] Identity: [0, 0]
inputPoint1
A CIVector class whose attribute type is CIAttributeTypeOffset and whose display name is Point 2l. Default value: [0.25, 0.25] Identity: [0.25, 0.25]
inputPoint2
A CIVector class whose attribute type is CIAttributeTypeOffset and whose display name is Point 3l. Default value: [0.5, 0.5] Identity: [0.5, 0.5]
inputPoint3
A CIVector class whose attribute type is CIAttributeTypeOffset and whose display name is Point 4. Default value: [0.75, 0.75] Identity: [0.75, 0.75]
inputPoint4
A CIVector class whose attribute type is CIAttributeTypeOffset and whose display name is Point 5. Default value: [1, 1] Identity: [1, 1]
i write these but my app crash with out giving any error
each filter accepts different kind of parameters but once you get use to them is pretty easy.
You didn’t post what error you are getting but this works for me:
And this is the result:
The image I used was taken from here and there you can find the curve I approximated in this example:
PS: If you are wondering why the my result image does not look exactly the same as the result in the link it is because my image is a partial image and color distribution is different. Alike but not exactly the same. So applying exactly the same curve will not give the exactly same result.
I hope it helps