Support for the legacy Fitbit Web API ends on September 30, 2026
Important: Support for the legacy Fitbit Web API ends on September 30, 2026. After this date the API will continue to operate, but Google will no longer fix bugs or provide API support. On October 30, 2026, the Fitbit Web API will be turned off and will no longer function or sync data to or from Fitbit users. To continue accessing data for your users after this date, migrate to the Google Health API.
Jpeg API
chevron down
 

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.