encode_bytes

Function Usage

Image encoding API of the ImageProcessor class. For details about the input and output formats, resolution ranges, and alignment modes, see Encode.

For details about how to use this API, see Image Encoding.

Prototype

encode_bytes(inputImage: Image, encodeLevel: int)

Input Parameters

Parameter

Type

Description

inputImage

Image

Image class before encoding.

encodeLevel

int

The default value is 100. For the Atlas 200/300/500 inference product, the input encoding level range is [0, 100]. For the Atlas 200I/500 A2 inference product and Atlas inference product, the value range is [1, 100].

Response Parameters

Encoded binary bytes data.

Exception Throwing Interface

If the encoding level is incorrect or the encoding fails, a runtime exception is thrown.