JpegXlEncoder class final

Encodes straight-alpha RGBA images as lossless JPEG XL Modular data.

Inheritance
Mixed-in types

Constructors

JpegXlEncoder({JpegXlEncodeOptions defaultOptions = const JpegXlEncodeOptions()})
Creates a lossless JPEG XL encoder.
const

Properties

defaultEncodeOptions → JpegXlEncodeOptions
The default encode options.
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

bind(Stream<Image> stream) → Stream<Uint8List>
Transforms the provided stream.
inherited
cast<RS, RT>() → Converter<RS, RT>
Provides a Converter<RS, RT> view of this stream transformer.
inherited
convert(Image input, {JpegXlEncodeOptions? encodeOptions}) → Uint8List
Converts input and returns the result of the conversion.
inherited
encode(Image input, {JpegXlEncodeOptions? encodeOptions}) → Uint8List
Encodes input to raster bytes.
inherited
encodeImageLossless(JpegXlDecodedImage image, {JpegXlEffort effort = JpegXlEffort.balanced}) → Uint8List
Losslessly re-encodes a decoded JpegXlDecodedImage (integer samples only).
encodeImageWith(ParallelRunner runner, Image input, JpegXlEncodeOptions options) → Future<Uint8List>
Encodes input, offering runner the parts that can run independently.
override
encodeLossless(Uint8List pixels, {required int width, required int height, bool grayscale = false, bool hasAlpha = false, JpegXlEffort effort = JpegXlEffort.balanced}) → Uint8List
Losslessly encodes interleaved 8-bit pixels. pixels layout is width * height * channelCount bytes where the channel count is 1 (gray), 2 (gray+alpha), 3 (RGB) or 4 (RGBA) according to grayscale and hasAlpha. A fully opaque alpha channel is omitted because the decoder recreates the same maximum alpha values when no alpha channel is present.
encodeLossless16(Uint16List pixels, {required int width, required int height, bool grayscale = false, bool hasAlpha = false, JpegXlEffort effort = JpegXlEffort.balanced}) → Uint8List
Losslessly encodes interleaved 16-bit pixels (same layout as encodeLossless), omitting a fully opaque alpha channel in the same way.
encodeLosslessWith(ParallelRunner runner, Uint8List pixels, {required int width, required int height, bool grayscale = false, bool hasAlpha = false, JpegXlEffort effort = JpegXlEffort.balanced}) → Future<Uint8List>
Losslessly encodes interleaved 8-bit pixels, running each group's share of the work through runner.
encodeLossy(Uint8List rgbPixels, {required int width, required int height, double distance = 1.0, VarDctConfiguration? config}) → Uint8List
Lossily (VarDCT) encodes an interleaved 8-bit RGB image (doc/lossy_encoder_plan.md's L0-L3 plus per-region chroma-from-luma: real HF coefficient context model, multi-group, multi-LF-group, adaptive quantization; filters and variable transform size are opt-in via config, off by default). width and height must be multiples of 8. distance is a cjxl-like quality knob (larger = smaller/lower quality); pass config instead for direct control over the quantizer knobs.
encodeWith(ParallelRunner runner, Image input, {JpegXlEncodeOptions? encodeOptions}) → Future<Uint8List>
Encodes input, offering runner the parts that can run independently.
inherited
encodeWithOptions(Image image, JpegXlEncodeOptions options) → Uint8List
Encodes input to raster bytes, with the given options or default options.
override
fuse<TT>(Converter<Uint8List, TT> other) → Converter<Image, TT>
Fuses this with other.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
startChunkedConversion(Sink<Uint8List> sink) → Sink<Image>
Starts a chunked conversion.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited