Skip to main content

JxlEncoderSetFrameDistance

Function JxlEncoderSetFrameDistance 

Source
pub unsafe extern "C" fn JxlEncoderSetFrameDistance(
    frame_settings: *mut JxlEncoderFrameSettings,
    distance: f32,
) -> JxlEncoderStatus
Expand description

Sets the distance level for lossy compression: target max butteraugli distance, lower = higher quality. Range: 0 .. 25. 0.0 = mathematically lossless (however, use @ref JxlEncoderSetFrameLossless instead to use true lossless, as setting distance to 0 alone is not the only requirement). 1.0 = visually lossless. Recommended range: 0.5 .. 3.0. Default value: 1.0.

@param frame_settings set of options and metadata for this frame. Also includes reference to the encoder object. @param distance the distance value to set. @return ::JXL_ENC_SUCCESS if the operation was successful, @ref JXL_ENC_ERROR otherwise.