Created
February 19, 2018 13:03
-
-
Save paskowski/34b016b5630c6ed851fe5bf11bbea071 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
class ViewController: UIViewController { | |
@IBOutlet weak var imageView: UIImageView! | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
let image = UIImage(named: "image-1.jpg") | |
let monoImageOperation = MonoImageOperation(inputImage: image!) | |
monoImageOperation.completionBlock = { | |
DispatchQueue.main.async { | |
self.imageView.image = monoImageOperation.outputImage | |
} | |
} | |
let operationQueue = OperationQueue() | |
operationQueue.addOperation(monoImageOperation) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment