Home  »  Swift Source  »  Swift Core Image Filter – CIImage and CIFilter

Swift Core Image Filter – CIImage and CIFilter

Posted on 24 Nov 2015

Swift Core Image Filter - CIImage and CIFilter

Sample demo shows how to use Core Image Filter within Swift 2, Xcode 7, iOS 9 application.

This example shows how to use CIImage and CIFilter (i.e. Core Image Filter) within iOS 9 application (Swift 2). It includes functionality like Select image from Gallery, or Capture from device Camera, Apply filter to selected image, Save filtered image to Phone Gallery. Please note, this example does not cover all Core Image filter but shows basic usage of photo effect filters i.e. how to apply photo effect to image using filter. You can use this code as a base and expand it’s functionality. It is free for personal or commercial use.

It consist functionality below:
– Select image from Gallery.
– or Capture from device Camera.
– Apply various filter to image.
– e.g. CIPhotoEffectChrome, CIPhotoEffectFade, CIPhotoEffectInstant, CIPhotoEffectMono, CIPhotoEffectNoir, CIPhotoEffectProcess, CIPhotoEffectTonal, CIPhotoEffectTransfer.
– Save filtered image to Photo Gallery.

Technology used
– UIImagePickerController.
– CIImage (Core Image).
– CIFilter (Core Image filter).
– Build with Xcode storyboard.
– Adaptive layout for major screen size support.
– Created with Swift 2, Xcode 7, iOS 9.

– Swift 2
– Xcode 7
– iOS 9

Supported Device
iPhone 4s, 5, 5s, 5c, 6, 6 Plus, 6s, 6s Plus, all iPad having iOS 9.

You can download source form GitHub profile.

Go to Top