Constructor
new RGBDataSet(img, rgbToData, ArrayType)
Create a DataSet from image pixel data
Parameters:
Name | Type | Description |
---|---|---|
img | Image | Any "imagable" object that can be drawn to a canvas |
rgbToData | function | Fnction converting 3 r,g,b bytes to a number |
ArrayType | constructor | A TypedArray or Array. (default Float32) |
- Source
Extends
Methods
(static) rgbToInt24(r, g, b) → {number}
Convert an r,g,b triple into an integer
Parameters:
Name | Type | Description |
---|---|---|
r | number | Red value, integer in [0,255] |
g | number | Green value, integer in [0,255] |
b | number | Blue value, integer in [0,255] |
- Source
Returns:
A 24 bit integer
- Type:
- number
(static) rgbScaleFunction(min, scale) → {number}
As above with min/scale
Parameters:
Name | Type | Description |
---|---|---|
min | number | The min return value |
scale | number | The scale factor |
- Source
Returns:
A 24 bit integer
- Type:
- number