---
title: nearestSampling
framework: coreimage
role: symbol
role_heading: Type Property
path: coreimage/ciimageoption/nearestsampling
---

# nearestSampling

The key into the properties dictionary to indicate whether to use nearest-neighbor sampling.

## Declaration

```swift
static let nearestSampling: CIImageOption
```

## Discussion

Discussion The value for this key is an NSNumber containing a Boolean value specifying whether the image should be sampled using nearest neighbor behavior.  An unspecified value defaults to linear sampling.

## See Also

### Type Properties

- [applyOrientationProperty](coreimage/ciimageoption/applyorientationproperty.md)
- [auxiliaryDepth](coreimage/ciimageoption/auxiliarydepth.md)
- [auxiliaryDisparity](coreimage/ciimageoption/auxiliarydisparity.md)
- [auxiliaryHDRGainMap](coreimage/ciimageoption/auxiliaryhdrgainmap.md)
- [auxiliaryPortraitEffectsMatte](coreimage/ciimageoption/auxiliaryportraiteffectsmatte.md)
- [auxiliarySemanticSegmentationGlassesMatte](coreimage/ciimageoption/auxiliarysemanticsegmentationglassesmatte.md)
- [auxiliarySemanticSegmentationHairMatte](coreimage/ciimageoption/auxiliarysemanticsegmentationhairmatte.md)
- [auxiliarySemanticSegmentationSkinMatte](coreimage/ciimageoption/auxiliarysemanticsegmentationskinmatte.md)
- [auxiliarySemanticSegmentationSkyMatte](coreimage/ciimageoption/auxiliarysemanticsegmentationskymatte.md)
- [auxiliarySemanticSegmentationTeethMatte](coreimage/ciimageoption/auxiliarysemanticsegmentationteethmatte.md)
- [cacheImmediately](coreimage/ciimageoption/cacheimmediately.md)
- [colorSpace](coreimage/ciimageoption/colorspace.md)
- [expandToHDR](coreimage/ciimageoption/expandtohdr.md)
- [properties](coreimage/ciimageoption/properties.md)
- [providerTileSize](coreimage/ciimageoption/providertilesize.md)
