pub unsafe extern "C-unwind" fn JxlEncoderGetRequiredCodestreamLevel(
enc: *mut JxlEncoder,
) -> i32Expand description
Returns the codestream level required to support the currently configured settings and basic info. This function can only be used at the beginning, before encoding starts, but after setting basic info.
This does not support per-frame settings, only global configuration, such as the image dimensions, that are known at the time of writing the header of the JPEG XL file.
If this returns 5, nothing needs to be done and the codestream can be
compatible with any decoder. If this returns 10, JxlEncoderSetCodestreamLevel
has to be used to set the codestream level to 10, or the encoder can be configured
differently to allow using the more compatible level 5.
§Parameters
enc: encoder object.
§Returns
-1: if no level can support the configuration (e.g. image dimensions larger than even level 10 supports),5: if level 5 is supported,10: if setting the codestream level to 10 is required.