JPEG XL-encode an image.
tf.raw_ops.EncodeJxl(
image, quality=95, effort=7, name=None
)
image is a rank-N uint8 or uint16 Tensor of shape batch_dims + [height, width, channels]
where channels is:
- 1: for grayscale.
- 3: for RGB.
- 4: for RGBA.
quality is mapped internally to a Butteraugli distance, using the same
mapping as cjxl -q: 100.0 maps to distance 0.0 (lossless modular encoding),
95.0 maps to distance 0.5 (default lossy VarDCT encoding), 90.0 maps to
distance 1.0, and 0.0 maps to distance 25.0. Note that quality factors are not
comparable across codecs; a given quality will not produce the same file size
or visual quality as the same value passed to tf.io.encode_jpeg.
Returns | |
|---|---|
A Tensor of type string.
|