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.
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:
pamtojpegxl was added to Netpbm in Release 11.17 (December 2026).