CIImage Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a set of instructions to create an image for use by CoreImage.
[Foundation.Register("CIImage", true)]
public class CIImage : Foundation.NSObject, Foundation.INSCopying, Foundation.INSSecureCoding, IDisposable
[<Foundation.Register("CIImage", true)>]
type CIImage = class
inherit NSObject
interface INSCoding
interface INativeObject
interface IDisposable
interface INSCopying
interface INSSecureCoding
- Inheritance
- Attributes
- Implements
Remarks
Unlike CoreGraphics images (CGImage) that are objects that hold the actual image data to be processed, CIImages represents a set of instructions to obtain an image. These recipes are used during the CoreImage filtering, analysis or rendering pipeline to actually create the bitmap representation.
CIImages are either the result of loading an image from disk, an NSData array, a CoreVideo buffer a CoreGraphics image, or the result of processing an image pipeline by CoreImage.
CIImages for example are used when chaining various filters (CIFilter) together and only their abstract representation is passed between the output of one filter and the input to another one. The image might not even reside in the main memory, it could reside entirely on the GPU space as an intermediate step between two filters.
Auto Enhancement Filters
The GetAutoAdjustmentFilters(CIAutoAdjustmentFilterOptions) method can be used to obtain a list of CIImage filters that can be used to correct various problems found in photos.
These typically include:
- Adjusts the shadow details (using the CIHighlightShadowAdjust filter). :
- Adjusts the image contrast (using the CIToneCurve filter). :
- Adjusts the image saturation (using the CIVibrance filter). :
- Adjusts the face color balance, adjust the tone of the skin (using the CIFaceBalance filter). :
You can configure which kind of filters you want to get or configure by setting the properties of an CIAutoAdjustmentFilterOptions instance and then calling the appropriate method.
void PrepareFixes (CIImage img)
{
var opt = new CIAutoAdjustmentFilterOptions () {
RedEye = true,
AutoAdjustCrop = true
};
foreach (var filter in img.GetAutoAdjustmentFilters (opt)) {
filter.Image = img;
img = filter.OutputImage;
}
}
Constructors
| Name | Description |
|---|---|
| CIImage(AVDepthData, NSDictionary) | |
| CIImage(AVDepthData) | |
| CIImage(AVPortraitEffectsMatte, NSDictionary) | |
| CIImage(AVPortraitEffectsMatte) | |
| CIImage(AVSemanticSegmentationMatte, NSDictionary) | |
| CIImage(AVSemanticSegmentationMatte) | |
| CIImage(CGImage, CIImageInitializationOptionsWithMetadata) |
Initializes a CoreImage Image from a CoreGraphics bitmap representation |
| CIImage(CGImage, NSDictionary) |
Initializes a CoreImage Image from a CoreGraphics bitmap representation |
| CIImage(CGImage) |
Initializes a CoreImage Image from a CoreGraphics bitmap representation |
| CIImage(CGImageSource, UIntPtr, CIImageInitializationOptionsWithMetadata) | |
| CIImage(CGImageSource, UIntPtr, NSDictionary) | |
| CIImage(CGLayer, CIImageInitializationOptions) | |
| CIImage(CGLayer, NSDictionary) | |
| CIImage(CGLayer) | |
| CIImage(CIColor) |
Creates an image with infinite dimensions that is filled with the specified color. |
| CIImage(CVImageBuffer, CIImageInitializationOptions) |
Initializes a CoreImage image from the contents of the specified CoreVideo image buffer. |
| CIImage(CVImageBuffer, NSDictionary<NSString,NSObject>) |
Constructs a CIImage using the options in |
| CIImage(CVImageBuffer) |
Initializes a CoreImage image from the contents of the specified CoreVideo image buffer. |
| CIImage(CVPixelBuffer, CIImageInitializationOptions) |
Constructs a CIImage using |
| CIImage(CVPixelBuffer, NSDictionary) |
Constructs a CIImage from the data in |
| CIImage(CVPixelBuffer) |
Constructs a CIImage with the supplied |
| CIImage(ICIImageProvider, UIntPtr, UIntPtr, CIFormat, CGColorSpace, CIImageProviderOptions) | |
| CIImage(IMTLTexture, NSDictionary) |
Constructs a CIImage using the |
| CIImage(Int32, CGSize, Boolean, CGColorSpace) | |
| CIImage(IOSurface, CIImageInitializationOptions) | |
| CIImage(IOSurface, NSDictionary) | |
| CIImage(IOSurface) | |
| CIImage(NativeHandle) |
A constructor used when creating managed representations of unmanaged objects. Called by the runtime. |
| CIImage(NSCoder) |
A constructor that initializes the object from the data stored in the unarchiver object. |
| CIImage(NSData, CIImageInitializationOptionsWithMetadata) |
Creates a new CIImage from the specified data. The image data must be premultiplied. |
| CIImage(NSData, IntPtr, CGSize, Int32, CGColorSpace) | |
| CIImage(NSData, NSDictionary) |
Creates a new CIImage from the specified data. The image data must be premultiplied. |
| CIImage(NSData) |
Creates a new CIImage from the specified data. The image data must be premultiplied. |
| CIImage(NSImageRep) | |
| CIImage(NSObjectFlag) |
Constructor to call on derived classes to skip initialization and merely allocate the object. |
| CIImage(NSUrl, CIImageInitializationOptions) |
Initializes a CoreImage image from the contents of the file pointed by the specified url. |
| CIImage(NSUrl, NSDictionary) |
Initializes a CoreImage image from the contents of the file pointed by the specified url. |
| CIImage(NSUrl) |
Initializes a CoreImage image from the contents of the file pointed by the specified url. |
| CIImage(UIImage, CIImageInitializationOptions) |
Initializes a CoreImage image from a UIKit image. |
| CIImage(UIImage, NSDictionary) |
Initializes a CoreImage image from a UIKit image. |
| CIImage(UIImage) |
Initializes a CoreImage image from a UIKit image. |
Properties
| Name | Description |
|---|---|
| AccessibilityAttributedUserInputLabels | (Inherited from NSObject) |
| AccessibilityRespondsToUserInteraction | (Inherited from NSObject) |
| AccessibilityTextualContext | (Inherited from NSObject) |
| AccessibilityUserInputLabels | (Inherited from NSObject) |
| BlackImage | |
| BlueImage | |
| CGImage | |
| Class | (Inherited from NSObject) |
| ClassHandle |
The Objective-C class handle for this class. |
| ClearImage | |
| ColorSpace | |
| ContentAverageLightLevel | |
| ContentHeadroom | |
| CyanImage | |
| DebugDescription | (Inherited from NSObject) |
| Definition | |
| DepthData | |
| Description | (Inherited from NSObject) |
| EmptyImage |
The empty image. |
| ExposedBindings | (Inherited from NSObject) |
| Extent |
Returns the extent of the image. |
| FormatA16 |
Obsolete.
Represents the value associated with the constant kCIFormatA16. |
| FormatA8 |
Obsolete.
Represents the value associated with the constant kCIFormatA8. |
| FormatABGR8 |
Obsolete.
Represents the value associated with the constant kCIFormatABGR8. |
| FormatAf |
Obsolete.
Represents the value associated with the constant kCIFormatAf. |
| FormatAh |
Obsolete.
Represents the value associated with the constant kCIFormatAh. |
| FormatARGB8 |
Obsolete.
Represents the value associated with the constant kCIFormatARGB8 |
| FormatBGRA8 |
Obsolete.
Represents the value associated with the constant kCIFormatBGRA8 |
| FormatL16 | |
| FormatL8 | |
| FormatLA16 | |
| FormatLA8 | |
| FormatLAf | |
| FormatLAh | |
| FormatLf | |
| FormatLh | |
| FormatR16 |
Obsolete.
Represents the value associated with the constant kCIFormatR16. |
| FormatR8 |
Obsolete.
Represents the value associated with the constant kCIFormatR8. |
| FormatRf |
Obsolete.
Represents the value associated with the constant kCIFormatRf. |
| FormatRG16 |
Obsolete.
Represents the value associated with the constant kCIFormatRG16. |
| FormatRG8 |
Obsolete.
Represents the value associated with the constant kCIFormatRG8. |
| FormatRgb10 |
Obsolete.
Represents the value associated with the constant 'kCIFormatRGB10'. |
| FormatRGBA16 | |
| FormatRGBA8 |
Obsolete.
Represents the value associated with the constant kCIFormatRGBA8 |
| FormatRGBAf |
Obsolete.
Represents the value associated with the constant kCIFormatRGBAf |
| FormatRGBAh |
Obsolete.
Represents the value associated with the constant kCIFormatRGBAh |
| FormatRgbX16 |
Obsolete.
Represents the value associated with the constant 'kCIFormatRGBX16'. |
| FormatRgbXf |
Obsolete.
Represents the value associated with the constant 'kCIFormatRGBXf'. |
| FormatRgbXh |
Obsolete.
Represents the value associated with the constant 'kCIFormatRGBXh'. |
| FormatRGf |
Obsolete.
Represents the value associated with the constant kCIFormatRGf. |
| FormatRGh |
Obsolete.
Represents the value associated with the constant kCIFormatRGh. |
| FormatRh |
Obsolete.
Represents the value associated with the constant kCIFormatRh. |
| GrayImage | |
| GreenImage | |
| Handle |
Handle (pointer) to the unmanaged object representation. (Inherited from NSObject) |
| IsDirectBinding | (Inherited from NSObject) |
| IsProxy | (Inherited from NSObject) |
| MagentaImage | |
| MetalTexture | |
| Opaque | |
| PixelBuffer |
The image data, as a CVPixelBuffer. |
| PortraitEffectsMatte | |
| Properties |
Gets a collection of metadata for this CIImage. |
| RedImage | |
| RetainCount | (Inherited from NSObject) |
| Self | (Inherited from NSObject) |
| SemanticSegmentationMatte | |
| Superclass | (Inherited from NSObject) |
| SuperHandle |
Handle used to represent the methods in the base class for this NSObject. (Inherited from NSObject) |
| Url |
If not |
| WhiteImage | |
| YellowImage | |
| Zone | (Inherited from NSObject) |
Methods
Operators
| Name | Description |
|---|---|
| Implicit(CGImage to CIImage) |
Implicit constructor that wraps a CGImage as a CIImage. |