Minimum unique abbreviation of option is acceptable. You may use double hyphens instead of single hyphen to denote options. You may use white space in place of the equals sign to separate an option name from its value.
This program is part of Netpbm.
pamtojpegxl converts the named PBM, PGM, PPM, or PAM file, or Standard Input if no file is named, to a JPEG XL image (JXL) file on Standard Output.
There is a subtle corruption of the image that happens in the conversion because the samples from the Netpbm input are passed to the JPEG XL encoder library as being in the sRGB color space, whereas in Netpbm images, samples are in the ITU-R Recommendation BT.709 color space. But the two color spaces are quite similar and both ostensible Netpbm images often are actually sRGB variations of the format and whatever the JPEG XL image gets used for may assume the samples in it are BT.709, so this is not necessarily a problem. If it is, you can use pnmgamma to create the sRGB variant from the true Netpbm input image.
JPEG XL is an improvement on JPEG produced in 2021 by the same group that produced JPEG, with the goal of replacing JPEG. Among other improvements, it can be generated and interpreted 60% faster than JPEG and has a lossless option.
pamtojpegxl testimg.ppm >testimg.jxl
In addition to the options common to all programs based on libnetpbm (most notably -quiet, see Common Options), pamtojpegxl recognizes the following command line options:
(There are no additional options).
pamtojpegxl was added to Netpbm in Release 11.17 (December 2026).