Process encoding of JPEG data using the specified encoder engine. This function processes the encoding of JPEG data using the provided encoder engine and configuration. It takes an input buffer containing the raw image data, performs encoding based on the configuration settings, and outputs the compressed bitstream.
Handle to the JPEG encoder engine to be used for encoding.
encode_cfg
Pointer to the configuration structure for the JPEG encoding process.
encode_inbuf
Pointer to the input buffer containing the raw image data.
inbuf_size
Size of the input buffer in bytes.
encode_outbuf
Pointer to the output buffer where the compressed bitstream will be stored.
outbuf_size
The size of output buffer.
out_size
Pointer to a variable where the size of the output bitstream will be stored.
Return value
- ESP_OK: JPEG encoder process successfully. - ESP_ERR_INVALID_ARG: JPEG encoder process failed because of invalid argument. - ESP_ERR_TIMEOUT: JPEG encoder process timeout.
Related Functions
Found 2 other functions taking a jpeg_encoder_t
argument:
Release resources used by a JPEG encoder instance. This function releases the resources used by the specified JPEG encoder instance. The encoder instance is specified by the `encoder_engine` parameter.
Examples
jpeg_encoder_process() is referenced by 1 libraries and example projects: