Closed zakkhoyt closed 7 years ago
I added the following public class methods:
public class func pixelBufferOf(image: UIImage) -> CVPixelBuffer?
public class func pixelBufferPropertiesOf(image: UIImage) -> (pixelBuffer: CVPixelBuffer?, size:CGSize, bytesPerRow: Int)
public class func getSizeOf(pixelBuffer: CVPixelBuffer) -> CGSize
public class func getBytesPerRowOf(pixelBuffer: CVPixelBuffer) -> Int
public class func pixelColorOf(image: UIImage, at point: CGPoint) -> UIColor?
and their matching instance methods
public func pixelBuffer() -> CVPixelBuffer? {
public func pixelColorAt(point: CGPoint) -> UIColor? {
public func pixelBufferProperties() -> (pixelBuffer: CVPixelBuffer?, size:CGSize, bytesPerRow: Int) {
// A one line call to retrieve color of a pixel public func pixelColorAt(point: CGPoint) -> UIColor?
// UIImage to pixel buffer in one line call public func pixelBuffer() -> CVPixelBuffer public func pixelBuffer() -> (pixelBuffer: CVPixelBuffer, size:CGSize, bytesPerRow: CGFloat)
Also add class function variants