Contents

init(imageData:options:)

Creates a filter that allows the processing of RAW images.

Declaration

init!(imageData data: Data!, options: [CIRAWFilterOption : Any]! = [:])

Parameters

  • data:

    The RAW image data to initialize the object with.

  • options:

    An options dictionary.

Return Value

A CIFilter object.

Discussion

You can pass any of the keys defined in RAW Image Options along with the appropriate value in options. You should provide a source type identifier hint key (kCGImageSourceTypeIdentifierHint) and the appropriate source type value to help the decoder determine the file type. Otherwise it’s possible to obtain incorrect results.

The first step when working with RAW images in Core Image is to process the image using either init(imageData:options:) or init(imageURL:options:). These initializers create a CIFilter object with an outputImage which is a CIImage representation of the supplied RAW image. You can process After calling this method, the CIFilter object returns a CIImage object that’s properly processed similar to images retrieved using the outputImage key.

See Also

Deprecated