---
title: "init(contentsOf:)"
framework: Core Image
role: symbol
role_heading: Initializer
platforms: [macOS 10.5+]
path: "coreimage/cifiltergenerator/init(contentsof:)"
---

# init(contentsOf:)

Initializes a filter generator object with the contents of a filter generator file.

## Declaration

```swift
init?(contentsOf aURL: URL)
```

## Parameters

- `aURL`: The location of a filter generator file.

## Return Value

Return Value The initialized CIFilterGenerator object. Returns nil if the file can’t be read.
