Skip to content
On this page

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

NameType
grayThresholdnumber

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

NameTypeDefault valueDescription
imageResourcestringundefinedimage path
widthnumber256The width of the rectangle from which the pixel data will be retrieved;
heightnumber256The height of the rectangle from which the pixel data will be retrieved
callback(pixelInformation: object) => voidundefinedcallback function

Returns

void

Overrides

ImagePixelInformation.getImageData

Defined in

components/imagePixelInformation/index.ts:64


Inherited from

ImagePixelInformation.uniGetImageData

Defined in

components/imagePixelInformation/index.ts:8