RgbQuant | Image Quantization Library (image-q)

### Hierarchy

- RgbQuant

### Implements

- IPaletteQuantizer

## Index

### Constructors

- constructor

### Properties

- _colors
- _distance
- _distanceIncrement
- _histogram
- _initialDistance

### Methods

- _buildPalette
- quantize
- sample

## Constructors

### constructor

- new RgbQuant(colorDistanceCalculator: IDistanceCalculator, colors?: number, method?: number): RgbQuant

- - Defined in palette/rgbquant/rgbquant.ts:48

  #### Parameters

  - ##### colorDistanceCalculator: IDistanceCalculator

  - ##### Default value colors: number = 256

  - ##### Default value method: number = 2

  #### Returns RgbQuant

## Properties

### Private _colors

_colors: number

- Defined in palette/rgbquant/rgbquant.ts:38

### Private _distance

_distance: IDistanceCalculator

- Defined in palette/rgbquant/rgbquant.ts:48

### Private _distanceIncrement

_distanceIncrement: number

- Defined in palette/rgbquant/rgbquant.ts:44

### Private _histogram

_histogram: ColorHistogram

- Defined in palette/rgbquant/rgbquant.ts:47

### Private _initialDistance

_initialDistance: number

- Defined in palette/rgbquant/rgbquant.ts:41

## Methods

### Private _buildPalette

- _buildPalette(idxi32: any): Palette

- - Defined in palette/rgbquant/rgbquant.ts:93

  #### Parameters

  - ##### idxi32: any

  #### Returns Palette

### quantize

- quantize(): Palette

- - Defined in palette/rgbquant/rgbquant.ts:84

  #### Returns Palette

### sample

- sample(image: PointContainer): void

- - Defined in palette/rgbquant/rgbquant.ts:63

  #### Parameters

  - ##### image: PointContainer

  #### Returns void

Generated using TypeDoc