JxlGainMapReadBundle

Function JxlGainMapReadBundle 

Source
pub unsafe extern "C-unwind" fn JxlGainMapReadBundle(
    map_bundle: *mut JxlGainMapBundle,
    input_buffer: *const u8,
    input_buffer_size: usize,
    bytes_read: *mut usize,
) -> JxlBool
Expand description

Deserializes a gain map bundle from a provided buffer and populates a JxlGainMapBundle structure with the data extracted. This function assumes the buffer contains a valid serialized gain map bundle. After successful execution, the JxlGainMapBundle structure will reference three different sections within the buffer:

  • gain_map_metadata
  • alt_icc
  • gain_map

These sections will be accompanied by their respective sizes. Users must ensure that the buffer remains valid as long as these pointers are in use.

§Parameters

  • map_bundle: Pointer to a preallocated JxlGainMapBundle where the deserialized data will be stored.
  • input_buffer: Pointer to the buffer containing the serialized gain map bundle data.
  • input_buffer_size: The size of the input buffer in bytes.
  • bytes_read: The number of bytes read from the input buffer.

§Returns

  • A boolean indicating whether reading the bundle was successful.