An ePOS <image> element. Embeds an image into the output.
A bit of a work-in-progress.
EposImage(image: EposImageData)
brightness: number
The gamma correction to use.
The image's color=. See EposImageColour.
Only colour1 is tested, due to the model I have not supporting any other value.
No-op when EposImage.prototype.mode === EposImageMode.Grayscale
The image's mode= and encoding function. See EposImageMode.
Only monochrome is tested, due to the model I have not supporting any other value.
imageDataChild: XMLBinaryText
The raw child used for the pure image data. It's contents are replaced in the toString() function.
setBrightness(brightness: number): this
Chainable helper for setting this.brightness.
setHalftone(halftone: EposImageHalftone): this
Chainable helper for setting this.halftone.
No-op when EposImage.prototype.mode === EposImageMode.Grayscale
toEposImageData(): Uint8Array
Returns a Uint8Array of the image data.
In Monochrome mode, this uses toMonoImage. In EposImageMode.Grayscale mode, this uses toGrayImage.
toString(): string
Converts this <image> to an XML String.
Calls EposImage.updateAttributes.
updateAttributes(): void
Sets the mode=, width=, height= and color= XML attributes.