<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.4.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreImage",
  "identifier" : "/documentation/CoreImage/CISampler/samplerWithImage:options:",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Core Image"
    ],
    "preciseIdentifier" : "c:objc(cs)CISampler(cm)samplerWithImage:options:"
  },
  "title" : "samplerWithImage:options:"
}
-->

# samplerWithImage:options:

Creates and returns a sampler that references an image using options specified in a dictionary.

```
+ (instancetype) samplerWithImage:(CIImage *) im options:(NSDictionary *) dict;
```

## Parameters

`im`

The image that you want the sampler to reference.

`dict`

A dictionary that contains options specified as key-value pairs. See [Sampler Option Keys](/documentation/CoreImage/sampler-option-keys).

## Return Value

A sampler that references the image specified by the `im` argument and uses the options specified in the dictionary.

---

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)