Appearance
Class: JavaScriptImagePixelInformation
Classdesc
JavaScript gets image pixel information
Implements
ImagePixelInformationInterface
Classes
JavaScriptImagePixelInformation
Param
grayscale threshold(default 100)
Hierarchy
ImagePixelInformation↳
JavaScriptImagePixelInformation
Constructors
constructor
• new JavaScriptImagePixelInformation(grayThreshold)
Parameters
| Name | Type |
|---|---|
grayThreshold | number |
Overrides
ImagePixelInformation.constructor
Defined in
components/imagePixelInformation/index.ts:60
Properties
grayThreshold
• grayThreshold: number
@description: grayscale threshold(default 100)
Defined in
components/imagePixelInformation/index.ts:59
Methods
getImageData
▸ getImageData(imageResource, width?, height?, callback): void
@description: Get image pixel information(rgba)
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
imageResource | string | undefined | image path |
width | number | 256 | The width of the rectangle from which the pixel data will be retrieved; |
height | number | 256 | The height of the rectangle from which the pixel data will be retrieved |
callback | (pixelInformation: object) => void | undefined | callback function |
Returns
void
Overrides
ImagePixelInformation.getImageData
Defined in
components/imagePixelInformation/index.ts:64
Inherited from
ImagePixelInformation.uniGetImageData
Printease