docs.rs failed to build jpegxl-rs-0.12.0+libjxl-0.11.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
jpegxl-rs-0.11.2+libjxl-0.11.1
jpegxl-rs
A safe JPEGXL wrapper over libjxl library. Check out the original library
and the bindings.
Building
If you wish to specify a custom library path, set the DEP_JXL_LIB environment variable.
To build libjxl and statically link it, use the vendored feature.
Usage
Currently, you can use u8, u16, f16, and f32 as pixel types.
Decoding
use *;
use *;
let mut decoder = decoder_builder.build.unwrap;
let sample = include_bytes!;
let = decoder.decode.unwrap;
match pixels
// Multi-threading
use ThreadsRunner;
let runner = default;
let mut decoder = decoder_builder
.parallel_runner
.build
.unwrap;
// Customize pixel format
let mut decoder = decoder_builder
.pixel_format
.build
.unwrap;
decoder.;
// You can change the settings after initialization
decoder.skip_reorientation = Some;
// Reconstruct JPEG, fallback to pixels if JPEG reconstruction is not possible
// This operation is finished in on pass
let = decoder.reconstruct.unwrap;
match data
Encoding
use ImageReader;
use encoder_builder;
use ;
let sample = open.unwrap.decode.unwrap.to_rgba16;
let mut encoder = encoder_builder.build.unwrap;
let buffer: = encoder.encode.unwrap;
// Set encoder options
let mut encoder = encoder_builder
.lossless
.speed
.build
.unwrap;
// You can change the settings after initialization
encoder.lossless = Some;
encoder.quality = 3.0;
image crate integration
By default, this integration uses the image integration. If you don't need it, turn off the image feature.
use ToDynamic;
use decoder_builder;
use DynamicImage;
let sample = read.unwrap;
let mut decoder = decoder_builder.build.unwrap;
let img = decoder.decode_to_image.unwrap;
let img = decoder..unwrap;
MSRV
Following the latest stable Debian rustc version. Currently: 1.85 (Debian Trixie)
License: GPL-3.0-or-later