This file contains 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
#!/bin/bash | |
# ==================================================================================================================== | |
# | |
# Converted for bash by @stollcri (stollcri at gmail dot com), 2020-07-28 | |
# | |
# Originally downloaded from: https://sites.google.com/site/c41digitallab/the-complexity | |
# | |
# ==================================================================================================================== | |
# C41LAB - Version 1.2 | |
# |
This file contains 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
extension NSImage { | |
/// Create a CIImage using the best representation available | |
/// | |
/// - Returns: Converted image, or nil | |
func asCIImage() -> CIImage? { | |
if let cgImage = self.asCGImage() { | |
return CIImage(cgImage: cgImage) | |
} | |
return nil | |
} |