Skip to content
🎨🚫 Make your image black and white
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
DDBlackWhite.xcodeproj
DDBlackWhite
DDBlackWhiteExample Added .podspec, added readme, changed min dep_target version to 9.0, … Mar 10, 2019
Info Added .podspec, added readme, changed min dep_target version to 9.0, … Mar 10, 2019
.gitignore
DDBlackWhite.podspec Added .podspec, added readme, changed min dep_target version to 9.0, … Mar 10, 2019
LICENSE
README.md

README.md

DDBlackWhite

Language Platform License Version

Make your image black and white

DDBlackWhite

Installation

CocoaPods

To install DDBlackWhite via CocoaPods, add the following line to your Podfile:

pod 'DDBlackWhite'

Manually

Add DDBlackWhite folder to your Xcode project.

Usage

See the example Xcode project.

Basic setup

Create the DDBlackWhite instance, set the inputImage and brightness variables. Call getFilteredImage method and its closure will return the filtered image.

let blackWhite = DDBlackWhite()
blackWhite.inputImage = image
blackWhite.brightness = 0.8
blackWhite.getFilteredImage { (image) in
// filtered image received
}

Populating the data

var inputImage: UIImage?
private(set) var outputImage: UIImage?
var brightness: CGFloat // The filter brightness value (0.0 ... 1.0), Default is 0.5

func getFilteredImage(closure: @escaping (UIImage?)->Void)

Requirements

  • iOS 9.0
  • Xcode 10, Swift 4.2

License

DDBlackWhite is available under the MIT license. See the LICENSE file for more info.

You can’t perform that action at this time.