Whats new in Core Image
Introduction to Core Image
CIKernel
- * Represents a program written in Core Image’s language
CIFilter
Has mutable input parameters
CIFilter
Uses one or more CIKernels to create a new image based on inputs
CIImage
- * An immutable object that represents the recipe for an image
CIContext
- An object through which Core Image draws results
What's new
- Metal
- As input and output of CIImage
- Core Image use Metal to render filters
- Some ClFiler use Metal for performance
- Filter
- 40 new filers for iOS Core Image
- PDF417 and Code128 generators
- Detectors
- CIFaceDetector
- CIBarcodeDetector
- CIRectangleDetector
- CITextDetector
- Color Management
- Supports ICC-based CGColorSpaceRef for input or output
- Correct Rendering of TIFFs and JPGs tagged with colorspace
- Improved CIKernel
- New CIKernel Classes
- Improved CIKernel Language
- Unified implementation
Bridging Core Image with other framework
- Using Metal with Core Image
- New render API with commandBuffer
Bridging Core Image and AV Foundation
- Core Image integrated with
AVVideoComposition
- Automatic color management which can be disabled
- Examples:
- Exporting an AVAsset applying CIFilters
- Playback an AVAseet applying CIFilters
Core Image Provider
UIImageView is not suggested for performance-needed applications as it renders twice in system one for CPU ad one for GPU.
//in iOS, expose the CALayer and apply CIFiler for best performance
class MyGLKView : GLKView {
}
class MyGLView : UIView {
override class func layerClass() -> AnyClass { return CAEAGLLayer.self }
}
CLContext should create once.
Core Image With SpriteKit
Core Image With SceneKit
Core Image With Core Animation