# OfficeScanProcessingOptions

Bounded, opt-in scan cleanup. The supplied source image is never modified.

Class 

`OfficeIMO.Drawing`

**Namespace**

`OfficeIMO.Drawing`

**Assembly**

`OfficeIMO.Core`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

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

**Modifiers**

sealed

Bounded, opt-in scan cleanup. The supplied source image is never modified.

## Inheritance

- object
- OfficeScanProcessingOptions

## Usage

Explore 2 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 1

- Method [OfficeScanProcessingOptions.Clone](/api/core/officeimo-drawing-officescanprocessingoptions/#method-clone)

### Accepted by parameters 1

- Method [OfficeScanProcessor.Process](/api/core/officeimo-drawing-officescanprocessor/#method-process-officeimo-drawing-officerasterimage-officeimo-drawing-officescanprocessingoptions-threading-cancellationtoken) parameter `options`

Filter members 

Show inherited

## Constructors

`public OfficeScanProcessingOptions()` [#](#constructor-ctor)

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

## Methods

`public OfficeScanProcessingOptions Clone()` [#](#method-clone)

[OfficeScanProcessingOptions.cs:51](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Raster/Scanning/OfficeScanProcessingOptions.cs#L51)

Creates an independent snapshot.

Returns

`OfficeScanProcessingOptions`

`public void Validate()` [#](#method-validate)

[OfficeScanProcessingOptions.cs:55](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Raster/Scanning/OfficeScanProcessingOptions.cs#L55)

Validates operation settings before allocating buffers or requesting provider work.

## Inherited Methods

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

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

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

Inherited from object

Returns

`int`

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

Inherited from object

Returns

`Type`

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

Inherited from object

Returns

`string?`

## Properties

`public int ClockwiseQuarterTurns { get; set; }` [#](#property-clockwisequarterturns)

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

Explicit clockwise quarter-turns, applied before deskew. Must be zero through three.

`public double StraightenDegrees { get; set; }` [#](#property-straightendegrees)

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

Additional clockwise rotation, from minus fifteen through fifteen degrees, applied with any detected deskew correction.

`public int BlackPoint { get; set; }` [#](#property-blackpoint)

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

Input sample mapped to black, from zero through 254. Must be less than WhitePoint.

`public int WhitePoint { get; set; }` [#](#property-whitepoint)

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

Input sample mapped to white, from one through 255. Must exceed BlackPoint.

`public double Gamma { get; set; }` [#](#property-gamma)

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

Midtone gamma, from 0.1 through 10. Values above one lighten midtones.

`public bool Deskew { get; set; }` [#](#property-deskew)

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

Detects a small text-line skew and corrects it only when the confidence threshold is met.

`public double MaximumDeskewAngleDegrees { get; set; }` [#](#property-maximumdeskewangledegrees)

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

Largest absolute skew considered, from one through fifteen degrees.

`public double MinimumDeskewConfidence { get; set; }` [#](#property-minimumdeskewconfidence)

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

Minimum relative projection-score separation required to apply detected skew.

`public bool NormalizeBackground { get; set; }` [#](#property-normalizebackground)

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

Normalizes locally estimated paper brightness while retaining darker foreground samples.

`public int BackgroundRadius { get; set; }` [#](#property-backgroundradius)

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

Radius, in processed pixels, of the local paper-brightness window. Must be one through 128.

`public OfficeScanColorMode ColorMode { get; set; }` [#](#property-colormode)

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

Color conversion applied after geometry and background normalization.

`public int? BilevelThreshold { get; set; }` [#](#property-bilevelthreshold)

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

Optional bilevel threshold. Null selects a global histogram threshold; values are one through 254.

`public int? MaximumDimension { get; set; }` [#](#property-maximumdimension)

[OfficeScanProcessingOptions.cs:40](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Raster/Scanning/OfficeScanProcessingOptions.cs#L40)

Optional longest-side limit. Images are downsampled proportionally and are never enlarged.

`public long MaximumPixels { get; set; }` [#](#property-maximumpixels)

[OfficeScanProcessingOptions.cs:42](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Raster/Scanning/OfficeScanProcessingOptions.cs#L42)

Maximum pixels in the source or any output canvas.

`public long MaximumWorkingBytes { get; set; }` [#](#property-maximumworkingbytes)

[OfficeScanProcessingOptions.cs:44](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Raster/Scanning/OfficeScanProcessingOptions.cs#L44)

Maximum accounted managed bytes, including source, output, analysis, and resampling buffers.

`public int MaximumAnalysisSamples { get; set; }` [#](#property-maximumanalysissamples)

[OfficeScanProcessingOptions.cs:46](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Raster/Scanning/OfficeScanProcessingOptions.cs#L46)

Maximum sampled foreground points used by deskew analysis.

`public long MaximumAnalysisOperations { get; set; }` [#](#property-maximumanalysisoperations)

[OfficeScanProcessingOptions.cs:48](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Raster/Scanning/OfficeScanProcessingOptions.cs#L48)

Maximum point projections evaluated during deskew analysis.

<!-- PowerForge markdown artifact sha256:899C3AEBCA9C3330B373237067A6368F18FCBE05615753A165FB0760E47C55B9 -->
