'\" t .\" Title: cjxl .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 04/07/2024 .\" Manual: \ \& .\" Source: \ \& .\" Language: English .\" .TH "CJXL" "1" "04/07/2024" "\ \&" "\ \&" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" cjxl \- compress images to JPEG XL .SH "SYNOPSIS" .sp \fBcjxl\fR [\fIoptions\fR\&...] \fIinput\fR [\fIoutput\&.jxl\fR] .SH "DESCRIPTION" .sp cjxl compresses an image or animation to the JPEG XL format\&. It is intended to spare users the trouble of determining a set of optimal parameters for each individual image\&. Instead, for a given target quality, it should provide consistent visual results across various kinds of images\&. The defaults have been chosen to be sensible, so that the following commands should give satisfactory results in most cases: .sp .if n \{\ .RS 4 .\} .nf cjxl input\&.png output\&.jxl cjxl input\&.jpg output\&.jxl cjxl input\&.gif output\&.jxl .fi .if n \{\ .RE .\} .SH "OPTIONS" .PP \-\-container=\fI0|1\fR .RS 4 0 = Do not encode using container format (strip Exif/XMP/JPEG bitstream reconstruction data)\&.1 = Force using container format (default: use only if needed)\&. .RE .PP \-\-jpeg_store_metadata=\fI0|1\fR .RS 4 If \-\-lossless_jpeg=1, store JPEG reconstruction metadata in the JPEG XL container (for lossless reconstruction of the JPEG codestream)\&.(default: 1) .RE .PP \-d \fIdistance\fR, \-\-distance=\fIdistance\fR .RS 4 Max\&. butteraugli distance, lower = higher quality\&. 0\&.0 = mathematically lossless\&. Default for already\-lossy input (JPEG/GIF)\&. 1\&.0 = visually lossless\&. Default for other input\&. Recommended range: 0\&.5 \&.\&. 3\&.0\&. Mutually exclusive with \-\-quality\&. .RE .PP \-q \fIquality\fR, \-\-quality=\fIquality\fR .RS 4 Quality setting (is remapped to \-\-distance)\&. Range: \-inf \&.\&. 100\&. 100 = mathematically lossless\&. Default for already\-lossy input (JPEG/GIF)\&. Other input gets encoded as per \-\-distance default\&. Positive quality values roughly match libjpeg quality\&. Mutually exclusive with \-\-distance\&. .RE .PP \-e \fIeffort\fR, \-\-effort=\fIeffort\fR .RS 4 Encoder effort setting\&. Range: 1 \&.\&. 9\&. Default: 7\&. Higher number is more effort (slower)\&. .sp Recognized effort settings, from fastest to slowest, are: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} 1 or \(lqlightning\(rq .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} 2 or \(lqthunder\(rq .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} 3 or \(lqfalcon\(rq .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} 4 or \(lqcheetah\(rq .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} 5 or \(lqhare\(rq .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} 6 or \(lqwombat\(rq .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} 7 or \(lqsquirrel\(rq (default) .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} 8 or \(lqkitten\(rq .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} 9 or \(lqtortoise\(rq .RE .RE .PP \-\-brotli_effort=\fIB_EFFORT\fR .RS 4 Brotli effort setting\&. Range: 0 \&.\&. 11\&. Default: 9\&. Higher number is more effort (slower)\&. .RE .PP \-\-faster_decoding=\fI0|1|2|3|4\fR .RS 4 Favour higher decoding speed\&. 0 = default, higher values give higher speed at the expense of quality .RE .PP \-p, \-\-progressive .RS 4 Enable progressive/responsive decoding\&. .RE .PP \-\-premultiply=\fI\-1|0|1\fR .RS 4 Force premultiplied (associated) alpha\&. .RE .PP \-\-keep_invisible=\fI0|1\fR .RS 4 Force disable/enable preserving color of invisible pixels (default: 1 if lossless, 0 if lossy)\&. .RE .PP \-\-group_order=\fI0|1\fR .RS 4 Order in which 256x256 groups are stored in the codestream for progressive rendering\&. Value not provided means \fIencoder default\fR, 0 means \fIscanline order\fR, 1 means \fIcenter\-first order\fR\&. .RE .PP \-\-center_x=\fI0\&.\&.XSIZE\fR .RS 4 Determines the horizontal position of center for the center\-first group order\&. The value \-1 means \fIuse the middle of the image\fR, other values [0\&.\&.xsize) set this to a particular coordinate\&. .RE .PP \-\-center_y=\fI0\&.\&.YSIZE\fR .RS 4 Determines the vertical position of center for the center\-first group order\&. The value \-1 means \fIuse the middle of the image\fR, other values [0\&.\&.ysize) set this to a particular coordinate\&. .RE .PP \-\-progressive_ac .RS 4 Use the progressive mode for AC\&. .RE .PP \-\-qprogressive_ac .RS 4 Use the progressive mode for AC with shift quantization\&. .RE .PP \-\-progressive_dc=\fInum_dc_frames\fR .RS 4 Progressive\-DC setting\&. Valid values are: \-1, 0, 1, 2\&. .RE .PP \-m=\fI0|1\fR, \-\-modular=\fI0|1\fR .RS 4 Use modular mode (not provided = encoder chooses, 0 = enforce VarDCT, 1 = enforce modular mode)\&. .RE .PP \-j=\fI0|1\fR, \-\-lossless_jpeg=\fI0|1\fR .RS 4 If the input is JPEG, losslessly transcode JPEG, rather than using reencode pixels\&. .RE .PP \-\-jpeg_reconstruction_cfl=\fI0|1\fR .RS 4 Enable/disable chroma\-from\-luma (CFL) for lossless JPEG reconstruction\&. .RE .PP \-\-num_threads=\fIN\fR .RS 4 Number of worker threads (\-1 == use machine default, 0 == do not use multithreading)\&. .RE .PP \-\-num_reps=\fIN\fR .RS 4 How many times to compress\&. (For benchmarking)\&. .RE .PP \-\-photon_noise=\fIISO3200\fR .RS 4 Adds noise to the image emulating photographic film noise\&. The higher the given number, the grainier the image will be\&. As an example, a value of 100 gives low noise whereas a value of 3200 gives a lot of noise\&. The default value is 0\&. .RE .PP \-\-dots=\fI0|1\fR .RS 4 Force disable/enable dots generation\&. (not provided = default, 0 = disable, 1 = enable)\&. .RE .PP \-\-patches=\fI0|1\fR .RS 4 Force disable/enable patches generation\&. (not provided = default, 0 = disable, 1 = enable)\&. .RE .PP \-\-resampling=\fI\-1|1|2|4|8\fR .RS 4 Resampling for extra channels\&. Default of \-1 applies resampling only for low quality\&. Value 1 does no downsampling (1x1), 2 does 2x2 downsampling, 4 is for 4x4 downsampling, and 8 for 8x8 downsampling\&. .RE .PP \-\-ec_resampling=\fI1|2|4|8\fR .RS 4 Resampling for extra channels\&. Default of \-1 applies resampling only for low quality\&. Value 1 does no downsampling (1x1), 2 does 2x2 downsampling, 4 is for 4x4 downsampling, and 8 for 8x8 downsampling\&. .RE .PP \-\-already_downsampled .RS 4 Do not downsample the given input before encoding, but still signal that the decoder should upsample\&. .RE .PP \-\-epf=\fI\-1|0|1|2|3\fR .RS 4 Edge preserving filter level, \-1 to 3\&. Value \-1 means: default (encoder chooses), 0 to 3 set a strength\&. .RE .PP \-\-gaborish=\fI0|1\fR .RS 4 Force disable/enable the gaborish filter\&. (not provided = default, 0 = disable, 1 = enable)\&. .RE .PP \-\-intensity_target=\fIN\fR .RS 4 Upper bound on the intensity level present in the image in nits\&. Leaving this set to its default of 0 lets libjxl choose a sensible default value based on the color encoding\&. .RE .PP \-x=\fIkey=value\fR, \-\-dec\-hints=\fIkey=value\fR .RS 4 color_space indicates the ColorEncoding, see Description(); icc_pathname refers to a binary file containing an ICC profile\&. .RE .sp \-\-override_bitdepth=0=use from image, 1\-32=override If nonzero, store the given bit depth in the JPEG XL file metadata (1\-32), instead of using the bit depth from the original input image\&. .PP \-I \fIF\fR, \-\-iterations=\fIF\fR .RS 4 [modular encoding] Fraction of pixels used to learn MA trees as a percentage\&. \-1 = default, 0 = no MA and fast decode, 50 = default value, 100 = all\&.Higher values use more encoder memory\&. .RE .PP \-C \fIK\fR, \-\-modular_colorspace=\fIK\fR .RS 4 [modular encoding] color transform: \-1=default, 0=RGB (none), 1\-41=RCT (6=YCoCg, default: try several, depending on speed) .RE .PP \-g \fIK\fR, \-\-modular_group_size=\fIK\fR .RS 4 [modular encoding] group size: \-1 == default\&. 0 ⇒ 128, 1 ⇒ 256, 2 ⇒ 512, 3 ⇒ 1024 .RE .PP \-P \fIK\fR, \-\-modular_predictor=\fIK\fR .RS 4 [modular encoding] predictor(s) to use: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} 0=zero, .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} 1=left, .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} 2=top, .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} 3=avg0, .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} 4=select, .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} 5=gradient, .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} 6=weighted, .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} 7=topright, .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} 8=topleft, .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} 9=leftleft, .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} 10=avg1, .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} 11=avg2, .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} 12=avg3, .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} 13=toptop predictive average .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} 14=mix 5 and 6, .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} 15=mix everything\&. .sp Default 14, at slowest speed default 15 .RE .RE .PP \-E \fIK\fR, \-\-modular_nb_prev_channels=\fIK\fR .RS 4 [modular encoding] number of extra MA tree properties to use .RE .PP \-\-modular_palette_colors=\fIK\fR .RS 4 [modular encoding] Use color palette if number of colors is smaller than or equal to this, or \-1 to use the encoder default\&. .RE .PP \-\-modular_lossy_palette .RS 4 [modular encoding] quantize to a palette that has fewer entries than would be necessary for perfect preservation; for the time being, it is recommended to set \-\-palette=0 with this option to use the default palette only .RE .PP \-X \fIPERCENT\fR, \-\-pre\-compact=\fIPERCENT\fR .RS 4 [modular encoding] Use Global channel palette if the number of colors is smaller than this percentage of range\&. Use 0\-100 to set an explicit percentage, \-1 to use the encoder default\&. .RE .PP \-Y \fIPERCENT\fR, \-\-post\-compact=\fIPERCENT\fR .RS 4 [modular encoding] Use Local (per\-group) channel palette if the number of colors is smaller than this percentage of range\&. Use 0\-100 to set an explicit percentage, \-1 to use the encoder default\&. .RE .PP \-\-codestream_level=\fIK\fR .RS 4 The codestream level\&. Either \-1, 5 or 10\&. .RE .PP \-R \fIK\fR, \-\-responsive=\fIK\fR .RS 4 [modular encoding] do Squeeze transform, 0=false, 1=true (default: true if lossy, false if lossless) .RE .sp \-V \-\-version:: Print encoder library version number and exit\&. .PP \-\-quiet .RS 4 Be more silent .RE .PP \-\-frame_indexing=\fIstring\fR .RS 4 If non\-empty, a string matching \fI^(0*|1[01]*)\fR\&. If this string has a \fI1\fR in i\-th position, then the i\-th frame will be indexed in the frame index box\&. .RE .PP \-v, \-\-verbose .RS 4 Increases verbosity\&. Can be repeated to increase it further, and also applies to \-\-help\&. .RE .PP \-h, \-\-help .RS 4 Displays the options that cjxl supports\&. On its own, it will only show basic options\&. It can be combined with \-v or \-v \-v to show increasingly advanced options as well\&. .RE .SH "EXAMPLES" .sp .if n \{\ .RS 4 .\} .nf # Compress a PNG file to a high\-quality JPEG XL version\&. $ cjxl input\&.png output\&.jxl # Compress it at a slightly lower quality, appropriate for web use\&. $ cjxl \-d 2 input\&.png output\&.jxl # Compress it losslessly\&. These are equivalent\&. $ cjxl \-d 0 input\&.png lossless\&.jxl $ cjxl \-q 100 input\&.png lossless\&.jxl # Compress a JPEG file losslessly\&. $ cjxl input\&.jpeg lossless\-jpeg\&.jxl .fi .if n \{\ .RE .\} .SH "SEE ALSO" .sp \fBdjxl\fR(1)