Jpeg API
decodeSync()
Decode a JPEG file to a native TXI image file
jpeg.decodeSync(filename: string, outputFilename: string, options?: JpegDecodeOptions | undefined)
Parameters
filename: string
The name of the JPEG file to decode.
outputFilename: string
The name of a TXI file to write to.
(optional) options: JpegDecodeOptions or undefined
Options decoding options.
decode()
Decode a JPEG file to a native TXI image file asynchronously
jpeg.decode(filename: string, outputFilename: string, options?: JpegDecodeOptions | undefined)
Parameters
filename: string
The name of the JPEG file to decode.
outputFilename: string
The name of a TXI file to write to.
(optional) options: JpegDecodeOptions or undefined
Options decoding options.
Interface: JpegDecodeOptions
Configuration options for the JPEG decoder.
Properties
delete
boolean or undefined
Indicates whether the jpeg file should be deleted after a successful decode.
If set to true
, the operation will delete the jpeg file on success.
If set to false
or isn't defined, the jpeg file will not be deleted.
overwrite
boolean or undefined
Indicates whether the txi file should be overwritten if it already exists.
If set to true
, the operation will overwrite the txi file if it already exists.
If set to false
or isn't defined, the decode will fail if the output file already exists.