---
title: samplingNearest()
framework: coreimage
role: symbol
role_heading: Instance Method
path: coreimage/ciimage/samplingnearest()
---

# samplingNearest()

Create an image by changing the receiver’s sample mode to nearest neighbor.

## Declaration

```swift
func samplingNearest() -> CIImage
```

## Return Value

Return Value  An autoreleased CIImage instance with a nearest sampling.

## See Also

### Sampling the Image

- [samplingLinear()](coreimage/ciimage/samplinglinear().md)
