iOS Guides | Samples

MonoTouch.CoreImage.CIImage Class

Represents a set of instructions to create an image for use by CoreImage.

See Also: CIImage

Syntax

[MonoTouch.Foundation.Register("CIImage", true)]
[MonoTouch.ObjCRuntime.Introduced(MonoTouch.ObjCRuntime.PlatformName.iOS, 5, 0, MonoTouch.ObjCRuntime.PlatformArchitecture.None, null)]
public class CIImage : NSObject, INSCopying, INSSecureCoding, IDisposable

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 CIImage.GetAutoAdjustmentFilters 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:

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.

C# Example

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;
    }
}

Related content

Requirements

Namespace: MonoTouch.CoreImage
Assembly: monotouch (in monotouch.dll)
Assembly Versions: 0.0.0.0

The members of MonoTouch.CoreImage.CIImage are listed below.

See Also: NSObject

Public Constructors

Initializes a CoreImage Image from a CoreGraphics bitmap representation
Initializes a CoreImage image from the contents of a CoreAnimation layer.
Creates an image with infinite dimensions that is filled with the specified color.
Initializes a CoreImage image from the contents of the specified CoreVideo image buffer.
Constructs a CIImage with the supplied buffer data.
A constructor that initializes the object from the data stored in the unarchiver object.
Creates a new CIImage from the specified data. The image data must be premultiplied.
Constructor to call on derived classes to skip initialization and merely allocate the object.
Initializes a CoreImage image from the contents of the file pointed by the specified url.
Initializes a CoreImage image from a UIKit image.
A constructor used when creating managed representations of unmanaged objects; Called by the runtime.
Initializes a CoreImage Image from a CoreGraphics bitmap representation
Initializes a CoreImage Image from a CoreGraphics bitmap representation
Initializes a CoreImage image from the contents of a CoreAnimation layer.
Initializes a CoreImage image from the contents of a CoreAnimation layer.
Initializes a CoreImage image from the contents of the specified CoreVideo image buffer.
Initializes a CoreImage image from the contents of the specified CoreVideo image buffer.
Constructs a CIImage using options.
Constructs a CIImage from the data in buffer, applying the options specified in dict.
Creates a new CIImage from the specified data. The image data must be premultiplied.
Creates a new CIImage from the specified data. The image data must be premultiplied.
Initializes a CoreImage image from the contents of the file pointed by the specified url.
Initializes a CoreImage image from the contents of the file pointed by the specified url.
Constructs a CIImage using the options.
Initializes a CoreImage image from a UIKit image.
Initializes a CoreImage image from a UIKit image.
Initializes a CoreImage image from an OpenGL texture, using the specific dimensions and colorspace.
Initializes a CoreImage from raw block provided by NSData.
Constructs a CIImage.

Public Properties

[read-only]
CGImageCGImage. Copies the CIImage into a new CGImage.
[read-only]
override
ClassHandleIntPtr. The handle for this class.
[read-only]
static
EmptyImageCIImage. The empty image.
[read-only]
ExtentRectangleF. Returns the extent of the image.
[read-only]
static
FormatA16Int32. Represents the value associated with the constant kCIFormatA16.
[read-only]
static
FormatA8Int32. Represents the value associated with the constant kCIFormatA8.
[read-only]
static
FormatABGR8Int32. Represents the value associated with the constant kCIFormatABGR8.
[read-only]
static
FormatAfInt32. Represents the value associated with the constant kCIFormatAf.
[read-only]
static
FormatAhInt32. Represents the value associated with the constant kCIFormatAh.
[read-only]
static
FormatARGB8Int32. Represents the value associated with the constant kCIFormatARGB8
[read-only]
static
FormatBGRA8Int32. Represents the value associated with the constant kCIFormatBGRA8
[read-only]
static
FormatR16Int32. Represents the value associated with the constant kCIFormatR16.
[read-only]
static
FormatR8Int32. Represents the value associated with the constant kCIFormatR8.
[read-only]
static
FormatRfInt32. Represents the value associated with the constant kCIFormatRf.
[read-only]
static
FormatRG16Int32. Represents the value associated with the constant kCIFormatRG16.
[read-only]
static
FormatRG8Int32. Represents the value associated with the constant kCIFormatRG8.
[read-only]
static
FormatRGBA8Int32. Represents the value associated with the constant kCIFormatRGBA8
[read-only]
static
FormatRGBAfInt32. Represents the value associated with the constant kCIFormatRGBAf
[read-only]
static
FormatRGBAhInt32. Represents the value associated with the constant kCIFormatRGBAh
[read-only]
static
FormatRGfInt32. Represents the value associated with the constant kCIFormatRGf.
[read-only]
static
FormatRGhInt32. Represents the value associated with the constant kCIFormatRGh.
[read-only]
static
FormatRhInt32. Represents the value associated with the constant kCIFormatRh.
[read-only]
PixelBufferCVPixelBuffer. The image data, as a CVPixelBuffer.
[read-only]
PropertiesCGImageProperties. Gets a collection of metadata for this CIImage.
[read-only]
UrlNSUrl. If not null, the URL from which the image was loaded.

Public Methods

Copy(NSZone) : NSObject
Performs a copy of the underlying Objective-C object.
CreateByApplyingGaussianBlur(Double) : CIImage
Creates a new CIImage by applying a Gaussian blur with the provided sigma.
CreateByClamping(RectangleF) : CIImage
Creates a new CIImage of infinite extent by cropping this CIImage to the rect and then extending the pixels at the edges to infinity.
CreateByClampingToExtent() : CIImage
Creates a new image by clamping the current image to the rectangle that is defined by its CIImage.Extent property.
CreateByColorMatchingColorSpaceToWorkingSpace(CGColorSpace) : CIImage
Creates a new CGImage by matching colors from colorSpace into the working color space.
CreateByColorMatchingWorkingSpaceToColorSpace(CGColorSpace) : CIImage
Creates a new CGImage by matching colors from the working space into colors in the specified colorSpace.
CreateByCompositingOverImage(CIImage) : CIImage
Creates a new image by compositing this CIImage over dest.
CreateByFiltering(String, NSDictionary) : CIImage
Creates a new image by applying filterName to this CIImage.
CreateByPremultiplyingAlpha() : CIImage
Creates a new image whose RGB values are created by multiplying this image's RGB values by this image's alpha value.
CreateBySettingAlphaOne(RectangleF) : CIImage
Creates a new image by copying this, setting the alpha of pixels within extent to 1.0 and setting those outside to 0.0.
CreateBySettingProperties(NSDictionary) : CIImage
Creates a new CIImage by copying this, and applying the properties.
CreateByUnpremultiplyingAlpha() : CIImage
Creates a new image whose RGB values are created by dividing this image's RGB values by this image's alpha value.
CreateWithOrientation(CIImageOrientation) : CIImage
Creates a new image by applying the orientation to this CIImage.
static
FromCGImage(CGImage) : CIImage
Creates an CIImage from a CGImage.
static
FromCGImage(CGImage, CGColorSpace) : CIImage
Creates a CIImage in colorspace from a CGImage.
static
FromCGImage(CGImage, CIImageInitializationOptionsWithMetadata) : CIImage
Creates a CIImage from a CGImage with the specified options.
static
FromCGImage(CGImage, NSDictionary) : CIImage
Creates a CIImage from a CGImage with the specified metadata, d.
static
FromData(NSData) : CIImage
Creates a new image from the specified data.
static
FromData(NSData, CIImageInitializationOptionsWithMetadata) : CIImage
Creates a new image from the specified data and options.
static
FromData(NSData, NSDictionary) : CIImage
Creates a new image from the specified data and d options dictionary.
static
FromData(NSData, Int32, SizeF, CIFormat, CGColorSpace) : CIImage
Creates a new CGImage with the specified bitmapData and properties.
static
FromData(NSData, Int32, SizeF, Int32, CGColorSpace) : CIImage
Creates a new image from the specified data and allows the app developer fine control.
static
FromImageBuffer(CVImageBuffer) : CIImage
Creates a new CIImage based on the data in the imageBuffer.
static
FromImageBuffer(CVPixelBuffer) : CIImage
Creates a new image from the data that is contained in buffer.
static
FromImageBuffer(CVImageBuffer, CIImageInitializationOptions) : CIImage
Creates a new CIImage based on the data in the imageBuffer and with the specified options.
static
FromImageBuffer(CVImageBuffer, NSDictionary) : CIImage
Creates a new CIImage based on the data in the imageBuffer and applying the options in dict.
static
FromImageBuffer(CVPixelBuffer, CIImageInitializationOptions) : CIImage
Creates a new image from the data that is contained in buffer by using the specified options.
static
FromImageBuffer(CVPixelBuffer, NSDictionary) : CIImage
Creates a new image from the data that is contained in buffer by using the options that are specified in dict.
static
FromMetalTexture(IMTLTexture, NSDictionary) : CIImage
Creates a new CIImage from texture, applying the creation options specified in options.
static
FromProvider(ICIImageProvider, UInt32, UInt32, CIFormat, CGColorSpace, CIImageProviderOptions) : CIImage
Creates a new CIImage based on the data in provider and with the specified properties and options.
static
FromUrl(NSUrl) : CIImage
Creates a new CIImage from url.
static
FromUrl(NSUrl, CIImageInitializationOptions) : CIImage
Creates a new CIImage from url by using the the specified options.
static
FromUrl(NSUrl, NSDictionary) : CIImage
Creates a new CIImage from url by using the options that are specified in d.
GetAutoAdjustmentFilters() : CIFilter[]
Gets the filters that are required to perform some common image correction steps to an image.
GetAutoAdjustmentFilters(CIAutoAdjustmentFilterOptions) : CIFilter[]
Gets the filters requires to perform some common image correction steps to an image.
GetImageTransform(CIImageOrientation) : CGAffineTransform
Gets a transformation that results in orientation.
GetRegionOfInterest(CIImage, RectangleF) : RectangleF
Gets a rectangle that describes the region in im, an image in the transformation list, that corresponds to r in this CIImage.
ImageByApplyingTransform(CGAffineTransform) : CIImage
Returns a new image that results from applying the affine transform matrix to this CIImage.
ImageByCroppingToRect(RectangleF) : CIImage
Creates a new image by cropping this CIImage to the rectangle r.
static
ImageWithColor(CIColor) : CIImage
Creates a new single-color image.
static
ImageWithTexture(UInt32, SizeF, Boolean, CGColorSpace) : CIImage
Creates an image from a named texture.

Public Operators

static
Conversion to MonoTouch.CoreImage.CIImage(Implicit)Implicit constructor that wraps a CGImage as a CIImage.