diff --git a/Sources/YUCIHighPass.m b/Sources/YUCIHighPass.m index bbccef7..7bc30bf 100644 --- a/Sources/YUCIHighPass.m +++ b/Sources/YUCIHighPass.m @@ -41,6 +41,10 @@ - (NSNumber *)inputRadius { return _inputRadius; } +- (void)setDefaults { + self.inputRadius = nil; +} + - (CIImage *)outputImage { CIFilter *blurFilter = [CIFilter filterWithName:@"CIGaussianBlur"]; [blurFilter setValue:self.inputRadius forKey:kCIInputRadiusKey]; diff --git a/Sources/YUCIHighPassSkinSmoothing.m b/Sources/YUCIHighPassSkinSmoothing.m index 8a6e751..5c728fd 100644 --- a/Sources/YUCIHighPassSkinSmoothing.m +++ b/Sources/YUCIHighPassSkinSmoothing.m @@ -149,6 +149,12 @@ - (void)setInputToneCurveControlPoints:(NSArray *)inputToneCurveCont return self.skinToneCurveFilter.rgbCompositeControlPoints; } +- (void)setDefaults { + self.inputAmount = nil; + self.inputRadius = nil; + self.skinToneCurveFilter = nil; +} + - (CIImage *)outputImage { YUCIHighPassSkinSmoothingMaskGenerator *maskGenerator = [[YUCIHighPassSkinSmoothingMaskGenerator alloc] init]; maskGenerator.inputRadius = self.inputRadius; diff --git a/Sources/YUCIRGBToneCurve.m b/Sources/YUCIRGBToneCurve.m index 90173ec..098df36 100644 --- a/Sources/YUCIRGBToneCurve.m +++ b/Sources/YUCIRGBToneCurve.m @@ -49,8 +49,20 @@ - (NSNumber *)inputIntensity { return _inputIntensity; } +- (NSArray *)defaultCurveControlPoints { + return [NSArray arrayWithObjects:[CIVector vectorWithX:0 Y:0], [CIVector vectorWithX:0.5 Y:0.5], [CIVector vectorWithX:1 Y:1], nil]; +} + +- (void)setDefaults { + self.inputIntensity = nil; + self.redControlPoints = self.defaultCurveControlPoints; + self.greenControlPoints = self.defaultCurveControlPoints; + self.blueControlPoints = self.defaultCurveControlPoints; + self.rgbCompositeControlPoints = self.defaultCurveControlPoints; +} + - (CIImage *)outputImage { - NSArray *defaultCurve = [NSArray arrayWithObjects:[CIVector vectorWithX:0 Y:0], [CIVector vectorWithX:0.5 Y:0.5], [CIVector vectorWithX:1 Y:1], nil]; + NSArray *defaultCurve = self.defaultCurveControlPoints; if (self.redControlPoints.count == 0) { self.redControlPoints = defaultCurve; }