ErrorDiffusionArray | Image Quantization Library (image-q)

### Hierarchy

- ErrorDiffusionArray

### Implements

- IImageDitherer

## Index

### Constructors

- constructor

### Properties

- _calculateErrorLikeGIMP
- _distance
- _kernel
- _minColorDistance
- _serpentine

### Methods

- _fillErrorLine
- _setKernel
- quantize

## Constructors

### constructor

- new ErrorDiffusionArray(colorDistanceCalculator: IDistanceCalculator, kernel: ErrorDiffusionArrayKernel, serpentine?: boolean, minimumColorDistanceToDither?: number, calculateErrorLikeGIMP?: boolean): ErrorDiffusionArray

- - Defined in image/array.ts:35

  #### Parameters

  - ##### colorDistanceCalculator: IDistanceCalculator

  - ##### kernel: ErrorDiffusionArrayKernel

  - ##### Default value serpentine: boolean = true

  - ##### Default value minimumColorDistanceToDither: number = 0

  - ##### Default value calculateErrorLikeGIMP: boolean = false

  #### Returns ErrorDiffusionArray

## Properties

### Private _calculateErrorLikeGIMP

_calculateErrorLikeGIMP: boolean

- Defined in image/array.ts:33

true = GIMP, false = XNVIEW

### Private _distance

_distance: IDistanceCalculator

- Defined in image/array.ts:35

### Private _kernel

_kernel: number[]

- Defined in image/array.ts:29

### Private _minColorDistance

_minColorDistance: number

- Defined in image/array.ts:27

### Private _serpentine

_serpentine: boolean

- Defined in image/array.ts:28

## Methods

### Private _fillErrorLine

- _fillErrorLine(errorLine: number[], width: number): void

- - Defined in image/array.ts:140

  #### Parameters

  - ##### errorLine: number[]

  - ##### width: number

  #### Returns void

### Private _setKernel

- _setKernel(kernel: ErrorDiffusionArrayKernel): void

- - Defined in image/array.ts:159

  #### Parameters

  - ##### kernel: ErrorDiffusionArrayKernel

  #### Returns void

### quantize

- quantize(pointBuffer: PointContainer, palette: Palette): PointContainer

- - Defined in image/array.ts:48

  #### Parameters

  - ##### pointBuffer: PointContainer

  - ##### palette: Palette

  #### Returns PointContainer

Generated using TypeDoc