Last active
January 17, 2020 01:55
-
-
Save almaleh/b79da7f3a424e6817f6ae633a6756321 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
| let imageProcessingQueue = DispatchQueue(label: "com.besher.image-processing") | |
| func processImageAsync(data: Data) -> UIImage? { | |
| guard let image = UIImage(data: data) else { return nil } | |
| imageProcessingQueue.async { | |
| let processedImage = upscaleAndFilter(image: image) | |
| return processedImage | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment