├── PhotoFilters.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── rbreve.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── rbreve.xcuserdatad │ └── xcschemes │ ├── PhotoFilters.xcscheme │ └── xcschememanagement.plist ├── PhotoFilters ├── PhotoFilterAppDelegate.h ├── PhotoFilterAppDelegate.m ├── PhotoFilterViewController.h ├── PhotoFilterViewController.m ├── PhotoFilters-Info.plist ├── PhotoFilters-Prefix.pch ├── UIImage+Filters.h ├── UIImage+Filters.m ├── en.lproj │ ├── InfoPlist.strings │ └── MainStoryboard.storyboard ├── flowers.jpg ├── gradient.jpg ├── highline.jpg ├── main.m ├── nyc.jpg └── paper.jpg └── README.md /PhotoFilters.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 2EC44350157BEE030089DADB /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2EC4434F157BEE030089DADB /* UIKit.framework */; }; 11 | 2EC44352157BEE030089DADB /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2EC44351157BEE030089DADB /* Foundation.framework */; }; 12 | 2EC44354157BEE030089DADB /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2EC44353157BEE030089DADB /* CoreGraphics.framework */; }; 13 | 2EC4435A157BEE030089DADB /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 2EC44358157BEE030089DADB /* InfoPlist.strings */; }; 14 | 2EC4435C157BEE030089DADB /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 2EC4435B157BEE030089DADB /* main.m */; }; 15 | 2EC44360157BEE030089DADB /* PhotoFilterAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 2EC4435F157BEE030089DADB /* PhotoFilterAppDelegate.m */; }; 16 | 2EC44363157BEE030089DADB /* MainStoryboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2EC44361157BEE030089DADB /* MainStoryboard.storyboard */; }; 17 | 2EC44366157BEE030089DADB /* PhotoFilterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2EC44365157BEE030089DADB /* PhotoFilterViewController.m */; }; 18 | 2EC4436D157BEEC40089DADB /* flowers.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 2EC4436C157BEEC40089DADB /* flowers.jpg */; }; 19 | 2EC44371157BEF830089DADB /* UIImage+Filters.m in Sources */ = {isa = PBXBuildFile; fileRef = 2EC44370157BEF830089DADB /* UIImage+Filters.m */; }; 20 | 2EC44373157BF1FD0089DADB /* CoreImage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2EC44372157BF1FD0089DADB /* CoreImage.framework */; }; 21 | 2EC44379157BF8E90089DADB /* nyc.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 2EC44378157BF8E90089DADB /* nyc.jpg */; }; 22 | 2EC4437B157C4D970089DADB /* paper.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 2EC4437A157C4D970089DADB /* paper.jpg */; }; 23 | 2EC4437D157C53160089DADB /* gradient.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 2EC4437C157C53160089DADB /* gradient.jpg */; }; 24 | 2EC4437F157C5D340089DADB /* highline.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 2EC4437E157C5D340089DADB /* highline.jpg */; }; 25 | /* End PBXBuildFile section */ 26 | 27 | /* Begin PBXFileReference section */ 28 | 2EC4434B157BEE030089DADB /* PhotoFilters.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PhotoFilters.app; sourceTree = BUILT_PRODUCTS_DIR; }; 29 | 2EC4434F157BEE030089DADB /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 30 | 2EC44351157BEE030089DADB /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 31 | 2EC44353157BEE030089DADB /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 32 | 2EC44357157BEE030089DADB /* PhotoFilters-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "PhotoFilters-Info.plist"; sourceTree = ""; }; 33 | 2EC44359157BEE030089DADB /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 34 | 2EC4435B157BEE030089DADB /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 35 | 2EC4435D157BEE030089DADB /* PhotoFilters-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PhotoFilters-Prefix.pch"; sourceTree = ""; }; 36 | 2EC4435E157BEE030089DADB /* PhotoFilterAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PhotoFilterAppDelegate.h; sourceTree = ""; }; 37 | 2EC4435F157BEE030089DADB /* PhotoFilterAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PhotoFilterAppDelegate.m; sourceTree = ""; }; 38 | 2EC44362157BEE030089DADB /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/MainStoryboard.storyboard; sourceTree = ""; }; 39 | 2EC44364157BEE030089DADB /* PhotoFilterViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PhotoFilterViewController.h; sourceTree = ""; }; 40 | 2EC44365157BEE030089DADB /* PhotoFilterViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PhotoFilterViewController.m; sourceTree = ""; }; 41 | 2EC4436C157BEEC40089DADB /* flowers.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = flowers.jpg; sourceTree = ""; }; 42 | 2EC4436F157BEF830089DADB /* UIImage+Filters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+Filters.h"; sourceTree = ""; }; 43 | 2EC44370157BEF830089DADB /* UIImage+Filters.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+Filters.m"; sourceTree = ""; }; 44 | 2EC44372157BF1FD0089DADB /* CoreImage.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreImage.framework; path = System/Library/Frameworks/CoreImage.framework; sourceTree = SDKROOT; }; 45 | 2EC44378157BF8E90089DADB /* nyc.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = nyc.jpg; sourceTree = ""; }; 46 | 2EC4437A157C4D970089DADB /* paper.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = paper.jpg; sourceTree = ""; }; 47 | 2EC4437C157C53160089DADB /* gradient.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = gradient.jpg; sourceTree = ""; }; 48 | 2EC4437E157C5D340089DADB /* highline.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = highline.jpg; sourceTree = ""; }; 49 | /* End PBXFileReference section */ 50 | 51 | /* Begin PBXFrameworksBuildPhase section */ 52 | 2EC44348157BEE030089DADB /* Frameworks */ = { 53 | isa = PBXFrameworksBuildPhase; 54 | buildActionMask = 2147483647; 55 | files = ( 56 | 2EC44373157BF1FD0089DADB /* CoreImage.framework in Frameworks */, 57 | 2EC44350157BEE030089DADB /* UIKit.framework in Frameworks */, 58 | 2EC44352157BEE030089DADB /* Foundation.framework in Frameworks */, 59 | 2EC44354157BEE030089DADB /* CoreGraphics.framework in Frameworks */, 60 | ); 61 | runOnlyForDeploymentPostprocessing = 0; 62 | }; 63 | /* End PBXFrameworksBuildPhase section */ 64 | 65 | /* Begin PBXGroup section */ 66 | 2EC44340157BEE020089DADB = { 67 | isa = PBXGroup; 68 | children = ( 69 | 2EC44372157BF1FD0089DADB /* CoreImage.framework */, 70 | 2EC44355157BEE030089DADB /* PhotoFilters */, 71 | 2EC4434E157BEE030089DADB /* Frameworks */, 72 | 2EC4434C157BEE030089DADB /* Products */, 73 | ); 74 | sourceTree = ""; 75 | }; 76 | 2EC4434C157BEE030089DADB /* Products */ = { 77 | isa = PBXGroup; 78 | children = ( 79 | 2EC4434B157BEE030089DADB /* PhotoFilters.app */, 80 | ); 81 | name = Products; 82 | sourceTree = ""; 83 | }; 84 | 2EC4434E157BEE030089DADB /* Frameworks */ = { 85 | isa = PBXGroup; 86 | children = ( 87 | 2EC4434F157BEE030089DADB /* UIKit.framework */, 88 | 2EC44351157BEE030089DADB /* Foundation.framework */, 89 | 2EC44353157BEE030089DADB /* CoreGraphics.framework */, 90 | ); 91 | name = Frameworks; 92 | sourceTree = ""; 93 | }; 94 | 2EC44355157BEE030089DADB /* PhotoFilters */ = { 95 | isa = PBXGroup; 96 | children = ( 97 | 2EC4436E157BEECB0089DADB /* Images */, 98 | 2EC4435E157BEE030089DADB /* PhotoFilterAppDelegate.h */, 99 | 2EC4435F157BEE030089DADB /* PhotoFilterAppDelegate.m */, 100 | 2EC44361157BEE030089DADB /* MainStoryboard.storyboard */, 101 | 2EC44364157BEE030089DADB /* PhotoFilterViewController.h */, 102 | 2EC44365157BEE030089DADB /* PhotoFilterViewController.m */, 103 | 2EC4436F157BEF830089DADB /* UIImage+Filters.h */, 104 | 2EC44370157BEF830089DADB /* UIImage+Filters.m */, 105 | 2EC44356157BEE030089DADB /* Supporting Files */, 106 | ); 107 | path = PhotoFilters; 108 | sourceTree = ""; 109 | }; 110 | 2EC44356157BEE030089DADB /* Supporting Files */ = { 111 | isa = PBXGroup; 112 | children = ( 113 | 2EC44357157BEE030089DADB /* PhotoFilters-Info.plist */, 114 | 2EC44358157BEE030089DADB /* InfoPlist.strings */, 115 | 2EC4435B157BEE030089DADB /* main.m */, 116 | 2EC4435D157BEE030089DADB /* PhotoFilters-Prefix.pch */, 117 | ); 118 | name = "Supporting Files"; 119 | sourceTree = ""; 120 | }; 121 | 2EC4436E157BEECB0089DADB /* Images */ = { 122 | isa = PBXGroup; 123 | children = ( 124 | 2EC4437E157C5D340089DADB /* highline.jpg */, 125 | 2EC44378157BF8E90089DADB /* nyc.jpg */, 126 | 2EC4437C157C53160089DADB /* gradient.jpg */, 127 | 2EC4437A157C4D970089DADB /* paper.jpg */, 128 | 2EC4436C157BEEC40089DADB /* flowers.jpg */, 129 | ); 130 | name = Images; 131 | sourceTree = ""; 132 | }; 133 | /* End PBXGroup section */ 134 | 135 | /* Begin PBXNativeTarget section */ 136 | 2EC4434A157BEE030089DADB /* PhotoFilters */ = { 137 | isa = PBXNativeTarget; 138 | buildConfigurationList = 2EC44369157BEE030089DADB /* Build configuration list for PBXNativeTarget "PhotoFilters" */; 139 | buildPhases = ( 140 | 2EC44347157BEE030089DADB /* Sources */, 141 | 2EC44348157BEE030089DADB /* Frameworks */, 142 | 2EC44349157BEE030089DADB /* Resources */, 143 | ); 144 | buildRules = ( 145 | ); 146 | dependencies = ( 147 | ); 148 | name = PhotoFilters; 149 | productName = PhotoFilters; 150 | productReference = 2EC4434B157BEE030089DADB /* PhotoFilters.app */; 151 | productType = "com.apple.product-type.application"; 152 | }; 153 | /* End PBXNativeTarget section */ 154 | 155 | /* Begin PBXProject section */ 156 | 2EC44342157BEE020089DADB /* Project object */ = { 157 | isa = PBXProject; 158 | attributes = { 159 | CLASSPREFIX = PhotoFilter; 160 | LastUpgradeCheck = 0430; 161 | ORGANIZATIONNAME = Icoms; 162 | }; 163 | buildConfigurationList = 2EC44345157BEE020089DADB /* Build configuration list for PBXProject "PhotoFilters" */; 164 | compatibilityVersion = "Xcode 3.2"; 165 | developmentRegion = English; 166 | hasScannedForEncodings = 0; 167 | knownRegions = ( 168 | en, 169 | ); 170 | mainGroup = 2EC44340157BEE020089DADB; 171 | productRefGroup = 2EC4434C157BEE030089DADB /* Products */; 172 | projectDirPath = ""; 173 | projectRoot = ""; 174 | targets = ( 175 | 2EC4434A157BEE030089DADB /* PhotoFilters */, 176 | ); 177 | }; 178 | /* End PBXProject section */ 179 | 180 | /* Begin PBXResourcesBuildPhase section */ 181 | 2EC44349157BEE030089DADB /* Resources */ = { 182 | isa = PBXResourcesBuildPhase; 183 | buildActionMask = 2147483647; 184 | files = ( 185 | 2EC4435A157BEE030089DADB /* InfoPlist.strings in Resources */, 186 | 2EC44363157BEE030089DADB /* MainStoryboard.storyboard in Resources */, 187 | 2EC4436D157BEEC40089DADB /* flowers.jpg in Resources */, 188 | 2EC44379157BF8E90089DADB /* nyc.jpg in Resources */, 189 | 2EC4437B157C4D970089DADB /* paper.jpg in Resources */, 190 | 2EC4437D157C53160089DADB /* gradient.jpg in Resources */, 191 | 2EC4437F157C5D340089DADB /* highline.jpg in Resources */, 192 | ); 193 | runOnlyForDeploymentPostprocessing = 0; 194 | }; 195 | /* End PBXResourcesBuildPhase section */ 196 | 197 | /* Begin PBXSourcesBuildPhase section */ 198 | 2EC44347157BEE030089DADB /* Sources */ = { 199 | isa = PBXSourcesBuildPhase; 200 | buildActionMask = 2147483647; 201 | files = ( 202 | 2EC4435C157BEE030089DADB /* main.m in Sources */, 203 | 2EC44360157BEE030089DADB /* PhotoFilterAppDelegate.m in Sources */, 204 | 2EC44366157BEE030089DADB /* PhotoFilterViewController.m in Sources */, 205 | 2EC44371157BEF830089DADB /* UIImage+Filters.m in Sources */, 206 | ); 207 | runOnlyForDeploymentPostprocessing = 0; 208 | }; 209 | /* End PBXSourcesBuildPhase section */ 210 | 211 | /* Begin PBXVariantGroup section */ 212 | 2EC44358157BEE030089DADB /* InfoPlist.strings */ = { 213 | isa = PBXVariantGroup; 214 | children = ( 215 | 2EC44359157BEE030089DADB /* en */, 216 | ); 217 | name = InfoPlist.strings; 218 | sourceTree = ""; 219 | }; 220 | 2EC44361157BEE030089DADB /* MainStoryboard.storyboard */ = { 221 | isa = PBXVariantGroup; 222 | children = ( 223 | 2EC44362157BEE030089DADB /* en */, 224 | ); 225 | name = MainStoryboard.storyboard; 226 | sourceTree = ""; 227 | }; 228 | /* End PBXVariantGroup section */ 229 | 230 | /* Begin XCBuildConfiguration section */ 231 | 2EC44367157BEE030089DADB /* Debug */ = { 232 | isa = XCBuildConfiguration; 233 | buildSettings = { 234 | ALWAYS_SEARCH_USER_PATHS = NO; 235 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 236 | CLANG_ENABLE_OBJC_ARC = YES; 237 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 238 | COPY_PHASE_STRIP = NO; 239 | GCC_C_LANGUAGE_STANDARD = gnu99; 240 | GCC_DYNAMIC_NO_PIC = NO; 241 | GCC_OPTIMIZATION_LEVEL = 0; 242 | GCC_PREPROCESSOR_DEFINITIONS = ( 243 | "DEBUG=1", 244 | "$(inherited)", 245 | ); 246 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 247 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 248 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 249 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 250 | GCC_WARN_UNUSED_VARIABLE = YES; 251 | IPHONEOS_DEPLOYMENT_TARGET = 5.1; 252 | SDKROOT = iphoneos; 253 | }; 254 | name = Debug; 255 | }; 256 | 2EC44368157BEE030089DADB /* Release */ = { 257 | isa = XCBuildConfiguration; 258 | buildSettings = { 259 | ALWAYS_SEARCH_USER_PATHS = NO; 260 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 261 | CLANG_ENABLE_OBJC_ARC = YES; 262 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 263 | COPY_PHASE_STRIP = YES; 264 | GCC_C_LANGUAGE_STANDARD = gnu99; 265 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 266 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 267 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 268 | GCC_WARN_UNUSED_VARIABLE = YES; 269 | IPHONEOS_DEPLOYMENT_TARGET = 5.1; 270 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 271 | SDKROOT = iphoneos; 272 | VALIDATE_PRODUCT = YES; 273 | }; 274 | name = Release; 275 | }; 276 | 2EC4436A157BEE030089DADB /* Debug */ = { 277 | isa = XCBuildConfiguration; 278 | buildSettings = { 279 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 280 | GCC_PREFIX_HEADER = "PhotoFilters/PhotoFilters-Prefix.pch"; 281 | INFOPLIST_FILE = "PhotoFilters/PhotoFilters-Info.plist"; 282 | PRODUCT_NAME = "$(TARGET_NAME)"; 283 | WRAPPER_EXTENSION = app; 284 | }; 285 | name = Debug; 286 | }; 287 | 2EC4436B157BEE030089DADB /* Release */ = { 288 | isa = XCBuildConfiguration; 289 | buildSettings = { 290 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 291 | GCC_PREFIX_HEADER = "PhotoFilters/PhotoFilters-Prefix.pch"; 292 | INFOPLIST_FILE = "PhotoFilters/PhotoFilters-Info.plist"; 293 | PRODUCT_NAME = "$(TARGET_NAME)"; 294 | WRAPPER_EXTENSION = app; 295 | }; 296 | name = Release; 297 | }; 298 | /* End XCBuildConfiguration section */ 299 | 300 | /* Begin XCConfigurationList section */ 301 | 2EC44345157BEE020089DADB /* Build configuration list for PBXProject "PhotoFilters" */ = { 302 | isa = XCConfigurationList; 303 | buildConfigurations = ( 304 | 2EC44367157BEE030089DADB /* Debug */, 305 | 2EC44368157BEE030089DADB /* Release */, 306 | ); 307 | defaultConfigurationIsVisible = 0; 308 | defaultConfigurationName = Release; 309 | }; 310 | 2EC44369157BEE030089DADB /* Build configuration list for PBXNativeTarget "PhotoFilters" */ = { 311 | isa = XCConfigurationList; 312 | buildConfigurations = ( 313 | 2EC4436A157BEE030089DADB /* Debug */, 314 | 2EC4436B157BEE030089DADB /* Release */, 315 | ); 316 | defaultConfigurationIsVisible = 0; 317 | }; 318 | /* End XCConfigurationList section */ 319 | }; 320 | rootObject = 2EC44342157BEE020089DADB /* Project object */; 321 | } 322 | -------------------------------------------------------------------------------- /PhotoFilters.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /PhotoFilters.xcodeproj/project.xcworkspace/xcuserdata/rbreve.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rbreve/iOS-Image-Filters/114dacadc41c98f2e4c4f45b63e6401d4d68568b/PhotoFilters.xcodeproj/project.xcworkspace/xcuserdata/rbreve.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /PhotoFilters.xcodeproj/xcuserdata/rbreve.xcuserdatad/xcschemes/PhotoFilters.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | 14 | 20 | 21 | 22 | 23 | 24 | 29 | 30 | 31 | 32 | 38 | 39 | 40 | 41 | 50 | 51 | 57 | 58 | 59 | 60 | 61 | 62 | 68 | 69 | 75 | 76 | 77 | 78 | 80 | 81 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /PhotoFilters.xcodeproj/xcuserdata/rbreve.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | PhotoFilters.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 2EC4434A157BEE030089DADB 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /PhotoFilters/PhotoFilterAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // PhotoFilterAppDelegate.h 3 | // PhotoFilters 4 | // 5 | // Created by Roberto Breve on 6/3/12. 6 | // Copyright (c) 2012 Icoms. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface PhotoFilterAppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /PhotoFilters/PhotoFilterAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // PhotoFilterAppDelegate.m 3 | // PhotoFilters 4 | // 5 | // Created by Roberto Breve on 6/3/12. 6 | // Copyright (c) 2012 Icoms. All rights reserved. 7 | // 8 | 9 | #import "PhotoFilterAppDelegate.h" 10 | 11 | @implementation PhotoFilterAppDelegate 12 | 13 | @synthesize window = _window; 14 | 15 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 16 | { 17 | // Override point for customization after application launch. 18 | return YES; 19 | } 20 | 21 | - (void)applicationWillResignActive:(UIApplication *)application 22 | { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 25 | } 26 | 27 | - (void)applicationDidEnterBackground:(UIApplication *)application 28 | { 29 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 31 | } 32 | 33 | - (void)applicationWillEnterForeground:(UIApplication *)application 34 | { 35 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 36 | } 37 | 38 | - (void)applicationDidBecomeActive:(UIApplication *)application 39 | { 40 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 41 | } 42 | 43 | - (void)applicationWillTerminate:(UIApplication *)application 44 | { 45 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 46 | } 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /PhotoFilters/PhotoFilterViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PhotoFilterViewController.h 3 | // PhotoFilters 4 | // 5 | // Created by Roberto Breve on 6/3/12. 6 | // Copyright (c) 2012 Icoms. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface PhotoFilterViewController : UIViewController 12 | - (IBAction)applyFilter:(id)sender; 13 | @property (weak, nonatomic) IBOutlet UIImageView *myPhoto; 14 | - (IBAction)resetImage; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /PhotoFilters/PhotoFilterViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // PhotoFilterViewController.m 3 | // PhotoFilters 4 | // 5 | // Created by Roberto Breve on 6/3/12. 6 | // Copyright (c) 2012 Icoms. All rights reserved. 7 | // 8 | 9 | #import "PhotoFilterViewController.h" 10 | 11 | #import "UIImage+Filters.h" 12 | 13 | @interface PhotoFilterViewController () 14 | @property (nonatomic, strong) UIImage *originalImage; 15 | @end 16 | 17 | @implementation PhotoFilterViewController 18 | @synthesize myPhoto; 19 | @synthesize originalImage = _originalImage; 20 | 21 | - (void)viewDidLoad 22 | { 23 | [super viewDidLoad]; 24 | // Do any additional setup after loading the view, typically from a nib. 25 | self.originalImage = self.myPhoto.image; 26 | 27 | NSArray *supportedFilters = [CIFilter filterNamesInCategory:kCICategoryBuiltIn]; 28 | for (NSString *filter in supportedFilters){ 29 | NSLog(@"%@", filter); 30 | } 31 | } 32 | 33 | - (void)viewDidUnload 34 | { 35 | [self setOriginalImage:nil]; 36 | [self setMyPhoto:nil]; 37 | [super viewDidUnload]; 38 | // Release any retained subviews of the main view. 39 | } 40 | 41 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 42 | { 43 | return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown); 44 | } 45 | 46 | - (IBAction)applyFilter:(UIButton *)sender { 47 | 48 | NSString *buttonTitle = sender.titleLabel.text; 49 | 50 | if ([buttonTitle isEqualToString:@"Saturation"]) { 51 | self.myPhoto.image = [self.myPhoto.image saturateImage:1.7 withContrast:1]; 52 | } 53 | 54 | if ([buttonTitle isEqualToString:@"B&W"]) { 55 | self.myPhoto.image = [self.myPhoto.image saturateImage:0 withContrast:1.05]; 56 | } 57 | 58 | if ([buttonTitle isEqualToString:@"Vignette"]) { 59 | self.myPhoto.image = [self.myPhoto.image vignetteWithRadius:0 andIntensity:18]; 60 | } 61 | 62 | if ([buttonTitle isEqualToString:@"Double"]){ 63 | 64 | self.myPhoto.image = [self.myPhoto.image blendMode:@"CIScreenBlendMode" withImageNamed:@"flowers.jpg"]; 65 | } 66 | 67 | if ([buttonTitle isEqualToString:@"Vintage"]) { 68 | self.myPhoto.image = [self.myPhoto.image blendMode:@"CISoftLightBlendMode" withImageNamed:@"paper.jpg"]; 69 | } 70 | 71 | if ([buttonTitle isEqualToString:@"Curve"]) { 72 | self.myPhoto.image = [self.myPhoto.image curveFilter]; 73 | } 74 | 75 | 76 | } 77 | - (IBAction)resetImage { 78 | [self.myPhoto setImage:self.originalImage]; 79 | 80 | } 81 | @end 82 | -------------------------------------------------------------------------------- /PhotoFilters/PhotoFilters-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | rbreve.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIMainStoryboardFile 28 | MainStoryboard 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /PhotoFilters/PhotoFilters-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'PhotoFilters' target in the 'PhotoFilters' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /PhotoFilters/UIImage+Filters.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+Filters.h 3 | // PhotoFilters 4 | // 5 | // Created by Roberto Breve on 6/2/12. 6 | // Copyright (c) 2012 Icoms. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIImage (Filters) 12 | - (UIImage*)saturateImage:(float)saturationAmount withContrast:(float)contrastAmount; 13 | - (UIImage*)vignetteWithRadius:(float)inputRadius andIntensity:(float)inputIntensity; 14 | -(UIImage*)worn; 15 | -(UIImage* )blendMode:(NSString *)blendMode withImageNamed:(NSString *) imageName; 16 | - (UIImage *)curveFilter; 17 | @end 18 | -------------------------------------------------------------------------------- /PhotoFilters/UIImage+Filters.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+Filters.m 3 | // PhotoFilters 4 | // 5 | // Created by Roberto Breve on 6/2/12. 6 | // Copyright (c) 2012 Icoms. All rights reserved. 7 | // 8 | 9 | #import "UIImage+Filters.h" 10 | 11 | @implementation UIImage (Filters) 12 | 13 | - (UIImage*)saturateImage:(float)saturationAmount withContrast:(float)contrastAmount{ 14 | UIImage *sourceImage = self; 15 | 16 | CIContext *context = [CIContext contextWithOptions:nil]; 17 | 18 | CIFilter *filter= [CIFilter filterWithName:@"CIColorControls"]; 19 | 20 | CIImage *inputImage = [[CIImage alloc] initWithImage:sourceImage]; 21 | 22 | [filter setValue:inputImage forKey:@"inputImage"]; 23 | 24 | [filter setValue:[NSNumber numberWithFloat:saturationAmount] forKey:@"inputSaturation"]; 25 | [filter setValue:[NSNumber numberWithFloat:contrastAmount] forKey:@"inputContrast"]; 26 | 27 | 28 | return [self imageFromContext:context withFilter:filter]; 29 | 30 | } 31 | 32 | 33 | - (UIImage*)vignetteWithRadius:(float)inputRadius andIntensity:(float)inputIntensity{ 34 | 35 | 36 | CIContext *context = [CIContext contextWithOptions:nil]; 37 | 38 | CIFilter *filter= [CIFilter filterWithName:@"CIVignette"]; 39 | 40 | CIImage *inputImage = [[CIImage alloc] initWithImage:self]; 41 | 42 | [filter setValue:inputImage forKey:@"inputImage"]; 43 | 44 | [filter setValue:[NSNumber numberWithFloat:inputIntensity] forKey:@"inputIntensity"]; 45 | [filter setValue:[NSNumber numberWithFloat:inputRadius] forKey:@"inputRadius"]; 46 | 47 | return [self imageFromContext:context withFilter:filter]; 48 | } 49 | 50 | -(UIImage*)worn{ 51 | CIImage *beginImage = [[CIImage alloc] initWithImage:self]; 52 | 53 | CIFilter *filter = [CIFilter filterWithName:@"CIWhitePointAdjust" 54 | keysAndValues: kCIInputImageKey, beginImage, 55 | @"inputColor",[CIColor colorWithRed:212 green:235 blue:200 alpha:1], 56 | nil]; 57 | CIImage *outputImage = [filter outputImage]; 58 | 59 | CIFilter *filterB = [CIFilter filterWithName:@"CIColorControls" 60 | keysAndValues: kCIInputImageKey, outputImage, 61 | @"inputSaturation", [NSNumber numberWithFloat:.8], 62 | @"inputContrast", [NSNumber numberWithFloat:0.8], 63 | nil]; 64 | CIImage *outputImageB = [filterB outputImage]; 65 | 66 | CIFilter *filterC = [CIFilter filterWithName:@"CITemperatureAndTint" 67 | keysAndValues: kCIInputImageKey, outputImageB, 68 | @"inputNeutral",[CIVector vectorWithX:6500 Y:3000 Z:0], 69 | @"inputTargetNeutral",[CIVector vectorWithX:5000 Y:0 Z:0], 70 | nil]; 71 | CIImage *outputImageC = [filterC outputImage]; 72 | CIContext *context = [CIContext contextWithOptions:nil]; 73 | CGImageRef imageRef = [context createCGImage:outputImageC fromRect:outputImageC.extent]; 74 | UIImage *image = [UIImage imageWithCGImage:imageRef scale:1.0 orientation:self.imageOrientation]; 75 | CGImageRelease(imageRef); 76 | return image; 77 | } 78 | 79 | 80 | -(UIImage* )blendMode:(NSString *)blendMode withImageNamed:(NSString *) imageName{ 81 | 82 | /* 83 | Blend Modes 84 | 85 | CISoftLightBlendMode 86 | CIMultiplyBlendMode 87 | CISaturationBlendMode 88 | CIScreenBlendMode 89 | CIMultiplyCompositing 90 | CIHardLightBlendMode 91 | */ 92 | 93 | CIImage *inputImage = [[CIImage alloc] initWithImage:self]; 94 | 95 | //try with different textures 96 | CIImage *bgCIImage = [[CIImage alloc] initWithImage:[UIImage imageNamed:imageName]]; 97 | 98 | 99 | CIContext *context = [CIContext contextWithOptions:nil]; 100 | 101 | CIFilter *filter= [CIFilter filterWithName:blendMode]; 102 | 103 | 104 | // inputBackgroundImage most be the same size as the inputImage 105 | 106 | [filter setValue:inputImage forKey:@"inputBackgroundImage"]; 107 | [filter setValue:bgCIImage forKey:@"inputImage"]; 108 | 109 | return [self imageFromContext:context withFilter:filter]; 110 | } 111 | 112 | 113 | - (UIImage *)curveFilter 114 | { 115 | 116 | 117 | CIImage *inputImage =[[CIImage alloc] initWithImage:self]; 118 | 119 | CIContext *context = [CIContext contextWithOptions:nil]; 120 | 121 | CIFilter *filter = [CIFilter filterWithName:@"CIToneCurve"]; 122 | 123 | 124 | [filter setDefaults]; 125 | [filter setValue:inputImage forKey:kCIInputImageKey]; 126 | [filter setValue:[CIVector vectorWithX:0.0 Y:0.0] forKey:@"inputPoint0"]; // default 127 | [filter setValue:[CIVector vectorWithX:0.25 Y:0.15] forKey:@"inputPoint1"]; 128 | [filter setValue:[CIVector vectorWithX:0.5 Y:0.5] forKey:@"inputPoint2"]; 129 | [filter setValue:[CIVector vectorWithX:0.75 Y:0.85] forKey:@"inputPoint3"]; 130 | [filter setValue:[CIVector vectorWithX:1.0 Y:1.0] forKey:@"inputPoint4"]; // default 131 | 132 | return [self imageFromContext:context withFilter:filter]; 133 | } 134 | 135 | 136 | - (UIImage*)imageFromContext:(CIContext*)context withFilter:(CIFilter*)filter 137 | { 138 | 139 | CGImageRef imageRef = [context createCGImage:[filter outputImage] fromRect:filter.outputImage.extent]; 140 | UIImage *image = [UIImage imageWithCGImage:imageRef scale:self.scale orientation:self.imageOrientation]; 141 | CGImageRelease(imageRef); 142 | return image; 143 | 144 | } 145 | 146 | 147 | 148 | 149 | 150 | @end 151 | -------------------------------------------------------------------------------- /PhotoFilters/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /PhotoFilters/en.lproj/MainStoryboard.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 37 | 52 | 67 | 82 | 97 | 112 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | -------------------------------------------------------------------------------- /PhotoFilters/flowers.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rbreve/iOS-Image-Filters/114dacadc41c98f2e4c4f45b63e6401d4d68568b/PhotoFilters/flowers.jpg -------------------------------------------------------------------------------- /PhotoFilters/gradient.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rbreve/iOS-Image-Filters/114dacadc41c98f2e4c4f45b63e6401d4d68568b/PhotoFilters/gradient.jpg -------------------------------------------------------------------------------- /PhotoFilters/highline.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rbreve/iOS-Image-Filters/114dacadc41c98f2e4c4f45b63e6401d4d68568b/PhotoFilters/highline.jpg -------------------------------------------------------------------------------- /PhotoFilters/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // PhotoFilters 4 | // 5 | // Created by Roberto Breve on 6/3/12. 6 | // Copyright (c) 2012 Icoms. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "PhotoFilterAppDelegate.h" 12 | 13 | int main(int argc, char *argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([PhotoFilterAppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /PhotoFilters/nyc.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rbreve/iOS-Image-Filters/114dacadc41c98f2e4c4f45b63e6401d4d68568b/PhotoFilters/nyc.jpg -------------------------------------------------------------------------------- /PhotoFilters/paper.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rbreve/iOS-Image-Filters/114dacadc41c98f2e4c4f45b63e6401d4d68568b/PhotoFilters/paper.jpg -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # About # 2 | A simplified UIImage category for using Core Image Filters. 3 | To accomplish vintage or double exposure effects I am using blend modes using two images. 4 | 5 | ## Vintage ## 6 | 7 | ![vintage](https://lh5.googleusercontent.com/-ose2-jKOuQc/T8wsvDM4e5I/AAAAAAAACjM/LOj3hKjrPu0/s512/Screen%2520Shot%25202012-06-03%2520at%25209.32.38%2520PM.png "Vintage Using Blend Modes") 8 | 9 | ## Vignette ## 10 | ![p1](https://lh6.googleusercontent.com/-LWUEsRJ8sgE/T8wsvFEl3HI/AAAAAAAACjU/YlUM8PUPvKc/s512/Screen%2520Shot%25202012-06-03%2520at%25209.32.55%2520PM.png) 11 | 12 | ## Double Exposure using Blend Modes ## 13 | ![p2](https://lh6.googleusercontent.com/-RIM2Vf62pBo/T8ws0N-dLUI/AAAAAAAACjs/aRK-sIbjO7I/s512/Screen%2520Shot%25202012-06-03%2520at%25209.33.14%2520PM.png) 14 | 15 | ## Black & White ## 16 | ![p3](https://lh5.googleusercontent.com/-Hkh3tSoF2e4/T8wszVlnXaI/AAAAAAAACjk/5lKVm_PBD2A/s512/Screen%2520Shot%25202012-06-03%2520at%25209.33.01%2520PM.png) 17 | 18 | # How to use on your project # 19 | 20 | * Drag `UIImage+Filters.h` and `UIImage+Filters.m` to your project 21 | * Include the header file `#import "UIImage+Filters.h"` 22 | * Be sure to include the CoreImage.framework on your project 23 | * To apply a filter to an UIImage just to this 24 | 25 | # Sample Code 26 | 27 | UIImage* myImage = [UIImage imageNamed:@"myphoto.jpg"]; 28 | myImage = [myImage saturateImage:0 withContrast:1.05]; 29 | 30 | # Current Filters # 31 | 32 | - (UIImage*) saturateImage:(float)saturationAmount withContrast:(float)contrastAmount; 33 | - (UIImage*) vignetteWithRadius:(float)inputRadius andIntensity:(float)inputIntensity; 34 | - (UIImage*) blendMode:(NSString *)blendMode withImageNamed:(NSString *) imageName; 35 | - (UIImage*) curveFilter; 36 | 37 | # Blend Mode # 38 | 39 | - (UIImage*) blendMode:(NSString *)blendMode withImageNamed:(NSString *) imageName; 40 | 41 | Will use imageName as a background layer to blendit into your image. 42 | 43 | Available blend modes you can use are: 44 | 45 | * CISoftLightBlendMode 46 | * CIMultiplyBlendMode 47 | * CISaturationBlendMode 48 | * CIScreenBlendMode 49 | * CIMultiplyCompositing 50 | * CIHardLightBlendMode 51 | 52 | # Apple Documentation # 53 | 54 | [Core Image Filter Reference](https://developer.apple.com/library/mac/documentation/graphicsimaging/reference/CoreImageFilterReference/index.html) --------------------------------------------------------------------------------