<!--
{
  "availability" : [
    "iOS: 10.0.0 - 27.0.0",
    "iPadOS: 10.0.0 - 27.0.0",
    "macCatalyst: 13.1.0 - 27.0.0",
    "macOS: 10.5.0 - 27.0.0",
    "tvOS: 10.0.0 - 27.0.0",
    "visionOS: 1.0.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "CoreImage",
  "identifier" : "/documentation/CoreImage/CIFilter-swift.class/init(imageURL:options:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Core Image",
      "CoreImage"
    ],
    "preciseIdentifier" : "c:objc(cs)CIFilter(cm)filterWithImageURL:options:"
  },
  "title" : "init(imageURL:options:)"
}
-->

# init(imageURL:options:)

Creates a filter that allows the processing of RAW images.

```
init!(imageURL url: URL!, options: [CIRAWFilterOption : Any]! = [:])
```

## Parameters

`url`

The location of a RAW image file.

`options`

An options dictionary.  You can pass any of the keys defined in [RAW Image Options](/documentation/CoreImage/raw-image-options).

## Return Value

A [`CIFilter`](/documentation/CoreImage/CIFilter-swift.class) object.

## Discussion

The first step when working with RAW images in Core Image is to process the image using either [`init(imageData:options:)`](/documentation/CoreImage/CIFilter-swift.class/init(imageData:options:)) or [`init(imageURL:options:)`](/documentation/CoreImage/CIFilter-swift.class/init(imageURL:options:)). These initializers create a [`CIFilter`](/documentation/CoreImage/CIFilter-swift.class) object with an [`outputImage`](/documentation/CoreImage/CIFilter-swift.class/outputImage) which is a [`CIImage`](/documentation/CoreImage/CIImage) representation of the supplied RAW image.

The newly created filter object allows you fine control over the image processing that isn’t available when working with processed images such a JPEG. The following listing shows how to create a Core Image filter based on a URL named `imageURL`. The image is processed so that its neutral temperature is set to 2,000 Kelvin (giving a blue tint) and its baseline exposure doubled. Finally, a Core Image vignette filter is applied to the processed image in the same way it would be with any other source image:

```objc
let rawFilter = CIFilter(imageURL: imageURL, options: nil)
rawFilter?.setValue(2000,    
                    forKey: kCIInputNeutralTemperatureKey)
if let baselineExposure = rawFilter?.value(forKey: kCIInputBaselineExposureKey) as? NSNumber {    
    rawFilter?.setValue(baselineExposure.doubleValue * 2.5,                        forKey: kCIInputBaselineExposureKey)
}
let vignettedImage = rawFilter?.outputImage?.applyingFilter(    
    "CIVignette",    
    withInputParameters: [kCIInputIntensityKey: 5])
if let outputImage = vignettedImage {    
    imageView.image = UIImage(ciImage: outputImage)
}
```

> Important:
> Core Image doesn’t process the supplied RAW image until the filter’s ``doc://com.apple.coreimage/documentation/CoreImage/CIFilter-swift.class/outputImage`` is rendered. For this reason, if you supply this initializer with a RAW image of an unsupported format, the filter object will be initialized but its ``doc://com.apple.coreimage/documentation/CoreImage/CIFilter-swift.class/outputImage`` will be `nil`.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)