# OfficeRasterResamplingMode

Sampling algorithm used when resizing dependency-free raster images.

Enum 

`OfficeIMO.Drawing`

**Namespace**

`OfficeIMO.Drawing`

**Assembly**

`OfficeIMO.Core`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[OfficeRasterResampler.cs:4](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Raster/OfficeRasterResampler.cs#L4)

**Base**

`Enum`

**Implements**

`IComparable` `ISpanFormattable` `IFormattable` `IConvertible`

**Modifiers**

sealed

Sampling algorithm used when resizing dependency-free raster images.

## Inheritance

- Enum
- OfficeRasterResamplingMode

## Usage

Explore 22 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 20

- Property [OfficeImageOptimizationRequest.ResamplingMode](/api/core/officeimo-drawing-officeimageoptimizationrequest/#property-resamplingmode)
- Field [OfficeRasterResamplingMode.Area](/api/core/officeimo-drawing-officerasterresamplingmode/#field-area)
- Field [OfficeRasterResamplingMode.Bicubic](/api/core/officeimo-drawing-officerasterresamplingmode/#field-bicubic)
- Field [OfficeRasterResamplingMode.Bilinear](/api/core/officeimo-drawing-officerasterresamplingmode/#field-bilinear)
- Field [OfficeRasterResamplingMode.Box](/api/core/officeimo-drawing-officerasterresamplingmode/#field-box)
- Field [OfficeRasterResamplingMode.CatmullRom](/api/core/officeimo-drawing-officerasterresamplingmode/#field-catmullrom)
- Field [OfficeRasterResamplingMode.Hermite](/api/core/officeimo-drawing-officerasterresamplingmode/#field-hermite)
- Field [OfficeRasterResamplingMode.Lanczos2](/api/core/officeimo-drawing-officerasterresamplingmode/#field-lanczos2)
- Field [OfficeRasterResamplingMode.Lanczos3](/api/core/officeimo-drawing-officerasterresamplingmode/#field-lanczos3)
- Field [OfficeRasterResamplingMode.Lanczos5](/api/core/officeimo-drawing-officerasterresamplingmode/#field-lanczos5)
- Field [OfficeRasterResamplingMode.Lanczos8](/api/core/officeimo-drawing-officerasterresamplingmode/#field-lanczos8)
- Field [OfficeRasterResamplingMode.MitchellNetravali](/api/core/officeimo-drawing-officerasterresamplingmode/#field-mitchellnetravali)
- Field [OfficeRasterResamplingMode.NearestNeighbor](/api/core/officeimo-drawing-officerasterresamplingmode/#field-nearestneighbor)
- Field [OfficeRasterResamplingMode.Robidoux](/api/core/officeimo-drawing-officerasterresamplingmode/#field-robidoux)
- Field [OfficeRasterResamplingMode.RobidouxSharp](/api/core/officeimo-drawing-officerasterresamplingmode/#field-robidouxsharp)
- Field [OfficeRasterResamplingMode.Spline](/api/core/officeimo-drawing-officerasterresamplingmode/#field-spline)
- Field [OfficeRasterResamplingMode.Triangle](/api/core/officeimo-drawing-officerasterresamplingmode/#field-triangle)
- Field [OfficeRasterResamplingMode.Welch](/api/core/officeimo-drawing-officerasterresamplingmode/#field-welch)
- Property [OfficeRasterResizeOptions.ResamplingMode](/api/core/officeimo-drawing-officerasterresizeoptions/#property-resamplingmode)
- Property [OfficeRasterResizePlan.ResamplingMode](/api/core/officeimo-drawing-officerasterresizeplan/#property-resamplingmode)

### Accepted by parameters 2

- Method [OfficeRasterResampler.GetResizeWorkingSetBytes](/api/core/officeimo-drawing-officerasterresampler/#method-getresizeworkingsetbytes-int32-int32-int32-int32-officeimo-drawing-officerasterresamplingmode-threading-cancellationtoken) parameter `mode`
- Method [OfficeRasterResampler.Resize](/api/core/officeimo-drawing-officerasterresampler/#method-resize-officeimo-drawing-officerasterimage-int32-int32-officeimo-drawing-officerasterresamplingmode) parameter `mode`

Filter members 

Show inherited

## Inherited Methods

`public int CompareTo(object? target)` [#](#method-compareto-object)

Inherited from Enum

Parameters

**target object? required**

Returns

`int`

`public override bool Equals(object? obj)` [#](#method-equals-object)

Inherited from Enum

Parameters

**obj object? required**

Returns

`bool`

`public override int GetHashCode()` [#](#method-gethashcode)

Inherited from Enum

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public TypeCode GetTypeCode()` [#](#method-gettypecode)

Inherited from Enum

Returns

`TypeCode`

`public bool HasFlag(Enum flag)` [#](#method-hasflag-enum)

Inherited from Enum

Parameters

**flag Enum required**

Returns

`bool`

ToString 4 overloads

`public override string ToString()` [#](#method-tostring)

Inherited from Enum

Returns

`string`

`public string ToString(string? format)` [#](#method-tostring-string)

Inherited from Enum

Parameters

**format string? required**

Returns

`string`

`public string ToString(IFormatProvider? provider)` [#](#method-tostring-iformatprovider)

Inherited from Enum

`Obsolete("The provider argument is not used. Use ToString() instead.")`

Parameters

**provider IFormatProvider? required**

Returns

`string`

`public string ToString(string? format, IFormatProvider? provider)` [#](#method-tostring-string-iformatprovider)

Inherited from Enum

`Obsolete("The provider argument is not used. Use ToString(String) instead.")`

Parameters

**format string? required**

**provider IFormatProvider? required**

Returns

`string`

## Values

`public const OfficeRasterResamplingMode NearestNeighbor` [#](#field-nearestneighbor)

[OfficeRasterResampler.cs:6](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Raster/OfficeRasterResampler.cs#L6)

Chooses the closest source pixel and preserves hard pixel edges.

Value: `0`

`public const OfficeRasterResamplingMode Bilinear` [#](#field-bilinear)

[OfficeRasterResampler.cs:8](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Raster/OfficeRasterResampler.cs#L8)

Interpolates four source pixels in premultiplied-alpha space.

Value: `1`

`public const OfficeRasterResamplingMode Area` [#](#field-area)

[OfficeRasterResampler.cs:10](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Raster/OfficeRasterResampler.cs#L10)

Area-averages downsampled axes and linearly interpolates enlarged axes in premultiplied-alpha space.

Value: `2`

`public const OfficeRasterResamplingMode Lanczos3` [#](#field-lanczos3)

[OfficeRasterResampler.cs:12](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Raster/OfficeRasterResampler.cs#L12)

Uses a radius-three Lanczos filter with antialiasing and premultiplied-alpha sampling.

Value: `3`

`public const OfficeRasterResamplingMode Bicubic` [#](#field-bicubic)

[OfficeRasterResampler.cs:14](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Raster/OfficeRasterResampler.cs#L14)

Antialiased cubic interpolation with B=0 and C=0.5.

Value: `4`

`public const OfficeRasterResamplingMode Box` [#](#field-box)

[OfficeRasterResampler.cs:16](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Raster/OfficeRasterResampler.cs#L16)

A constant half-pixel-support reconstruction kernel.

Value: `5`

`public const OfficeRasterResamplingMode Triangle` [#](#field-triangle)

[OfficeRasterResampler.cs:18](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Raster/OfficeRasterResampler.cs#L18)

A one-pixel triangular reconstruction kernel with antialiasing.

Value: `6`

`public const OfficeRasterResamplingMode Hermite` [#](#field-hermite)

[OfficeRasterResampler.cs:20](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Raster/OfficeRasterResampler.cs#L20)

A smooth one-pixel Hermite reconstruction kernel.

Value: `7`

`public const OfficeRasterResamplingMode Lanczos2` [#](#field-lanczos2)

[OfficeRasterResampler.cs:22](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Raster/OfficeRasterResampler.cs#L22)

A radius-two windowed sinc reconstruction kernel.

Value: `8`

`public const OfficeRasterResamplingMode Lanczos5` [#](#field-lanczos5)

[OfficeRasterResampler.cs:24](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Raster/OfficeRasterResampler.cs#L24)

A radius-five windowed sinc reconstruction kernel.

Value: `9`

`public const OfficeRasterResamplingMode Lanczos8` [#](#field-lanczos8)

[OfficeRasterResampler.cs:26](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Raster/OfficeRasterResampler.cs#L26)

A radius-eight windowed sinc reconstruction kernel.

Value: `10`

`public const OfficeRasterResamplingMode MitchellNetravali` [#](#field-mitchellnetravali)

[OfficeRasterResampler.cs:28](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Raster/OfficeRasterResampler.cs#L28)

A balanced cubic kernel with B=C=1/3.

Value: `11`

`public const OfficeRasterResamplingMode CatmullRom` [#](#field-catmullrom)

[OfficeRasterResampler.cs:30](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Raster/OfficeRasterResampler.cs#L30)

The Catmull-Rom cubic kernel, mathematically equal to Bicubic (B=0, C=0.5).

Value: `12`

`public const OfficeRasterResamplingMode Robidoux` [#](#field-robidoux)

[OfficeRasterResampler.cs:32](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Raster/OfficeRasterResampler.cs#L32)

The Robidoux cubic kernel with B=0.3782157551 and C=0.3108921225.

Value: `13`

`public const OfficeRasterResamplingMode RobidouxSharp` [#](#field-robidouxsharp)

[OfficeRasterResampler.cs:34](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Raster/OfficeRasterResampler.cs#L34)

The sharper Robidoux cubic kernel with B=0.2620145124 and C=0.3689927438.

Value: `14`

`public const OfficeRasterResamplingMode Spline` [#](#field-spline)

[OfficeRasterResampler.cs:36](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Raster/OfficeRasterResampler.cs#L36)

A cubic B-spline reconstruction kernel with B=1 and C=0.

Value: `15`

`public const OfficeRasterResamplingMode Welch` [#](#field-welch)

[OfficeRasterResampler.cs:38](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Raster/OfficeRasterResampler.cs#L38)

A radius-three sinc kernel with a parabolic Welch window.

Value: `16`

<!-- PowerForge markdown artifact sha256:504BF055531FC9E118039869B8F6EC5C7DF2771DDD612C88A5286396E5A57E10 -->
