PointContainer | Image Quantization Library (image-q)

v8 optimizations done. fromXXX methods are static to move out polymorphic code from class instance itself.

### Hierarchy

- PointContainer

## Index

### Constructors

- constructor

### Properties

- _height
- _pointArray
- _width

### Methods

- clone
- getHeight
- getPointArray
- getWidth
- setHeight
- setWidth
- toUint32Array
- toUint8Array
- fromArray
- fromCanvasPixelArray
- fromHTMLCanvasElement
- fromHTMLImageElement
- fromImageData
- fromNodeCanvas
- fromUint32Array
- fromUint8Array

## Constructors

### constructor

- new PointContainer(): PointContainer

- - Defined in utils/pointContainer.ts:19

  #### Returns PointContainer

## Properties

### Private _height

_height: number

- Defined in utils/pointContainer.ts:19

### Private _pointArray

_pointArray: Point[]

- Defined in utils/pointContainer.ts:17

### Private _width

_width: number

- Defined in utils/pointContainer.ts:18

## Methods

### clone

- clone(): PointContainer

- - Defined in utils/pointContainer.ts:47

  #### Returns PointContainer

### getHeight

- getHeight(): number

- - Defined in utils/pointContainer.ts:31

  #### Returns number

### getPointArray

- getPointArray(): Point[]

- - Defined in utils/pointContainer.ts:43

  #### Returns Point[]

### getWidth

- getWidth(): number

- - Defined in utils/pointContainer.ts:27

  #### Returns number

### setHeight

- setHeight(height: number): void

- - Defined in utils/pointContainer.ts:39

  #### Parameters

  - ##### height: number

  #### Returns void

### setWidth

- setWidth(width: number): void

- - Defined in utils/pointContainer.ts:35

  #### Parameters

  - ##### width: number

  #### Returns void

### toUint32Array

- toUint32Array(): Uint32Array

- - Defined in utils/pointContainer.ts:60

  #### Returns Uint32Array

### toUint8Array

- toUint8Array(): Uint8Array

- - Defined in utils/pointContainer.ts:71

  #### Returns Uint8Array

### Static fromArray

- fromArray(byteArray: number[], width: number, height: number): PointContainer

- - Defined in utils/pointContainer.ts:119

  #### Parameters

  - ##### byteArray: number[]

  - ##### width: number

  - ##### height: number

  #### Returns PointContainer

### Static fromCanvasPixelArray

- fromCanvasPixelArray(data: any, width: number, height: number): PointContainer

- - Defined in utils/pointContainer.ts:124

  #### Parameters

  - ##### data: any

  - ##### width: number

  - ##### height: number

  #### Returns PointContainer

### Static fromHTMLCanvasElement

- fromHTMLCanvasElement(canvas: HTMLCanvasElement): PointContainer

- - Defined in utils/pointContainer.ts:89

  #### Parameters

  - ##### canvas: HTMLCanvasElement

  #### Returns PointContainer

### Static fromHTMLImageElement

- fromHTMLImageElement(img: HTMLImageElement): PointContainer

- - Defined in utils/pointContainer.ts:75

  #### Parameters

  - ##### img: HTMLImageElement

  #### Returns PointContainer

### Static fromImageData

- fromImageData(imageData: ImageData): PointContainer

- - Defined in utils/pointContainer.ts:103

  #### Parameters

  - ##### imageData: ImageData

  #### Returns PointContainer

### Static fromNodeCanvas

- fromNodeCanvas(canvas: any): PointContainer

- - Defined in utils/pointContainer.ts:99

  #### Parameters

  - ##### canvas: any

  #### Returns PointContainer

### Static fromUint32Array

- fromUint32Array(uint32array: Uint32Array, width: number, height: number): PointContainer

- - Defined in utils/pointContainer.ts:132

  #### Parameters

  - ##### uint32array: Uint32Array

  - ##### width: number

  - ##### height: number

  #### Returns PointContainer

### Static fromUint8Array

- fromUint8Array(uint8array: Uint8Array, width: number, height: number): PointContainer

- - Defined in utils/pointContainer.ts:128

  #### Parameters

  - ##### uint8array: Uint8Array

  - ##### width: number

  - ##### height: number

  #### Returns PointContainer

Generated using TypeDoc