A simplified UIImage category for using Core Image Filters. To accomplish vintage or double exposure effects I am using blend modes using two images.
- Drag
UIImage+Filters.h
andUIImage+Filters.m
to your project - Include the header file
#import "UIImage+Filters.h"
- Be sure to include the CoreImage.framework on your project
- To apply a filter to an UIImage just to this
UIImage* myImage = [UIImage imageNamed:@"myphoto.jpg"];
myImage = [myImage saturateImage:0 withContrast:1.05];
- (UIImage*) saturateImage:(float)saturationAmount withContrast:(float)contrastAmount;
- (UIImage*) vignetteWithRadius:(float)inputRadius andIntensity:(float)inputIntensity;
- (UIImage*) blendMode:(NSString *)blendMode withImageNamed:(NSString *) imageName;
- (UIImage*) curveFilter;
- (UIImage*) blendMode:(NSString *)blendMode withImageNamed:(NSString *) imageName;
Will use imageName as a background layer to blendit into your image.
Available blend modes you can use are:
- CISoftLightBlendMode
- CIMultiplyBlendMode
- CISaturationBlendMode
- CIScreenBlendMode
- CIMultiplyCompositing
- CIHardLightBlendMode