Skip to content

cmdshepard/Image-Filter-Processor-Swift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Image-Filter-Processor-Swift

This library contains code for five different filter formulas.

How to use:

  1. Import 'RGBAImage.swift' & 'ImageProcessor.swift' into your project

  2. Create & initialize an image processor object with the applyFilter method.

  3. The applyFilter method takes in the name of the default filter as a String and outputs the filtered image as a UIImage

// Sample:

var image: UIImage?

let blueFilter = imageProcessor(imageInput: image!).applyFilter("blue") // 'blue' default filter

let grayscaleFilter = imageProcessor(imageInput: image!).applyFilter("grayscale") // 'grayscale' default filter

let invertFilter = imageProcessor(imageInput: image!).applyFilter("invert") // 'invert' default filter

let sepiaFilter = imageProcessor(imageInput: image!).applyFilter("sepia") // 'sepia' default filter

let brightFilter = imageProcessor(imageInput: image!).applyFilter("bright") // 'bright' default filter

print("Cheers!")

About

A quick and easy way to apply filters to UIImage in Swift.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages