pub unsafe extern "C-unwind" fn JxlDecoderSetKeepOrientation(
dec: *mut JxlDecoder,
keep_orientation: JxlBool,
) -> JxlDecoderStatusExpand description
Enables or disables preserving of as-in-bitstream pixeldata orientation. Some images are encoded with an Orientation tag indicating that the decoder must perform a rotation and/or mirroring to the encoded image data.
- If
skip_reorientationisJxlBool::False(the default): the decoder will apply the transformation from the orientation setting, hence rendering the image according to its specified intent. When producing aJxlBasicInfo, the decoder will always set the orientation field toJxlOrientation::Identity(matching the returned pixel data) and also align xsize and ysize so that they correspond to the width and the height of the returned pixel data. - If
skip_reorientationisJxlBool::True: the decoder will skip applying the transformation from the orientation setting, returning the image in the as-in-bitstream pixeldata orientation. This may be faster to decode since the decoder doesn’t have to apply the transformation, but can cause wrong display of the image if the orientation tag is not correctly taken into account by the user.
By default, this option is disabled, and the returned pixel data is re-oriented according to the image’s Orientation setting.
This function must be called at the beginning, before decoding is performed.
See JxlBasicInfo for the orientation field, and JxlOrientation for the
possible values.
§Parameters
dec: decoder objectskip_reorientation:JxlBool::Trueto enable,JxlBool::Falseto disable.
§Returns
JxlDecoderStatus::Successif no error,JxlDecoderStatus::Errorotherwise.