JxlEncodeOptions
How ImageKodec.encodeJxl writes a JPEG XL file (#179).
A lossy file is coded with VarDCT in the XYB colour space. Its loss is set by distance, in the units of cjxl -d: 1.0 is about visually lossless, larger is smaller and worse. When distance is null it comes from quality as cjxl -q maps it: 0.1 + (100 - quality) * 0.09 from 30 up, so 90 gives 1.0 and 100 gives 0.1, and 53 / 3000 * quality^2 - 23 / 20 * quality + 25 below 30, so 0 gives 25.
A lossless file is coded with Modular and decodes to exactly the input, at every depth and channel count; quality and distance are then ignored.
Constructors
Properties
1 (fast) to 3 (thorough). Lossless: 1 tries one predictor and a small tree, 2 tries six predictors, both palette and colour transform for images of few colours, and a tree of up to 256 leaves, 3 tries every predictor and colour transform and a tree of up to 1024 leaves that may test the channels before. Lossy: 1 uses 8 by 8 transforms only, 2 also 16 by 16, 16 by 8 and 8 by 16, and 3 also the 32 by 32 transforms.