Facebook Twitter Gplus LinkedIn RSS
 
 
Home » Blog » “Instagram-Like” Core Image Filters in iOS

“Instagram-Like” Core Image Filters in iOS

If you read yesterday’s post, you know that I’ve been working on adding Instagram-like photo effects to Demotivate HD. This vintage look is all the rage ever since Instagram took the world by storm last year with their Facebook like appeal, except with pictures. Mac OS X has always had the CIFilter implementation on the desktop, but up until recently, it wasn’t possible to use any of these Core Image filters on the iPhone and iPad. With the release of iOS 5, Apple added a small subset to the SDK framework. Most likely, they added the less CPU intensive ones, but these days the iDevices aren’t bottlenecked at the CPU as much as they were during first generation of handsets.

Here is what we got so far:

CIAdditionCompositing
CIAffineTransform
CICheckerboardGenerator
CIColorBlendMode
CIColorBurnBlendMode
CIColorControls
CIColorCube
CIColorDodgeBlendMode
CIColorInvert
CIColorMatrix
CIColorMonochrome
CIConstantColorGenerator
CICrop
CIDarkenBlendMode
CIDifferenceBlendMode
CIExclusionBlendMode
CIExposureAdjust
CIFalseColor
CIGammaAdjust
CIGaussianGradient
CIHardLightBlendMode
CIHighlightShadowAdjust
CIHueAdjust
CIHueBlendMode
CILightenBlendMode
CILinearGradient
CILuminosityBlendMode
CIMaximumCompositing
CIMinimumCompositing
CIMultiplyBlendMode
CIMultiplyCompositing
CIOverlayBlendMode
CIRadialGradient
CISaturationBlendMode
CIScreenBlendMode
CISepiaTone
CISoftLightBlendMode
CISourceAtopCompositing
CISourceInCompositing
CISourceOutCompositing
CISourceOverCompositing
CIStraightenFilter
CIStripesGenerator
CITemperatureAndTint
CIToneCurve
CIVibrance
CIVignette
CIWhitePointAdjust

Most of these have built in defaults, so all you need to do is call them to see the effect. If you use the ImageFilter plugin, it is pretty easy to slip in your own filters to get whatever effect you desire. You might have also noticed some of the more infamous filters are missing, like the Gloom effect. These most likely will be released in the future. To keep tabs on the latest, run the following script.

1
2
3
4
5
6
7
8
NSArray *filterNames = 
    [CIFilter filterNamesInCategory:kCICategoryBuiltIn];
 
NSLog(@"Built in filters");
for (NSString *currentFilterName in filterNames)
{
    NSLog(@"%@", currentFilterName);
}
NSArray *filterNames = 
    [CIFilter filterNamesInCategory:kCICategoryBuiltIn];
 
NSLog(@"Built in filters");
for (NSString *currentFilterName in filterNames)
{
    NSLog(@"%@", currentFilterName);
}

About the Author: Sprawl

Stephen Russell is a Mobile App developer and all around IT geek that spends his days running data centers and his nights coding. This site is the go to place for all of zSprawl's work and the infamous development blog. In his free time, he enjoys tinkering with web code, playing video games, and otherwise plotting to take over the Internets.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

© 2012 zSprawl's zApps

Fork me on GitHub