ppmtopjxl
Convert PPM images to JPEG XL images
TLDR
Convert a PPM image into an PJXL file
Resize the input image
Shift the input image
Do not use the normal TIFF 4.0 compression method
SYNOPSIS
ppmtopjxl [options] [inputfile]
PARAMETERS
-output=filename
Specifies the path and name of the output file where the JPEG XL image will be saved. If this option is omitted, the encoded image is written to standard output.
-quality=value
Sets the desired lossy compression quality for the JPEG XL output. The value typically ranges from 0 (lowest quality, highest compression) to 100 (highest quality, lowest compression). The default quality setting is 90.
-lossless
Enables lossless compression mode. When this option is specified, the -quality option is ignored, ensuring that the decoded JPEG XL image is bit-for-bit identical to the original PPM input.
-effort=value
Controls the encoding effort, balancing compression speed against file size. Higher values (e.g., 9) result in slower encoding but potentially smaller file sizes, while lower values (e.g., 1) offer faster encoding but less optimal compression. The default effort level is 7.
-epf=value
Enables or disables the Edge Preserving Filter (EPF) during JPEG XL encoding. A value of 1 enables EPF (which is the default), and 0 disables it. EPF helps to maintain sharpness and detail at higher compression ratios.
-progressive
Activates progressive encoding, which allows the JPEG XL image to be displayed in a gradual, improving quality as it loads, similar to progressive JPEG.
-num_threads=N
Defines the number of parallel threads to use for the encoding process. Utilizing more threads can accelerate encoding on systems with multi-core processors. The default is usually determined by the system or library.
-verbose
Activates verbose output, causing the command to print detailed information about the encoding process to standard error, which can be useful for debugging or monitoring.
-version
Displays the version information of the underlying libjxl library that ppmtopjxl uses for JPEG XL encoding.
-help
Prints a comprehensive help message to standard output, detailing all available options and command usage.
DESCRIPTION
The ppmtopjxl command is a utility from the Netpbm suite, specifically designed to convert images from the Portable Pixmap (PPM) format into the advanced JPEG XL (JXL) format. It operates by reading a PPM image from standard input by default (or from a specified input file) and then writes the resulting JPEG XL image to standard output (or to a designated output file). JPEG XL represents a significant leap forward in image coding, offering superior compression efficiency compared to older formats like JPEG, alongside a rich set of features including robust lossless compression, efficient progressive decoding, and comprehensive support for high dynamic range (HDR) images. This makes it a powerful and versatile successor for various modern imaging applications.
Essentially, ppmtopjxl serves as a convenient front-end, leveraging the capabilities of the underlying libjxl library. This integration allows users within the Netpbm ecosystem to seamlessly incorporate JPEG XL's cutting-edge features into their existing image processing and manipulation workflows, facilitating the adoption of this efficient new image standard.
CAVEATS
The specific options and their behavior for ppmtopjxl can vary slightly depending on the version of the Netpbm package and the linked libjxl library. For optimal performance and access to the latest features, it is recommended to use recent and stable versions of Netpbm and its dependencies. As JPEG XL is a relatively new image format, compatibility across different image viewing and editing software might still be evolving.
HISTORY
ppmtopjxl was integrated into the Netpbm project to extend its capabilities with support for the cutting-edge JPEG XL image format. JPEG XL, standardized in 2021, was developed to succeed older image formats like JPEG by offering superior compression efficiency and advanced features, including lossless compression, alpha channel support, and HDR capabilities. The inclusion of ppmtopjxl allows Netpbm users to seamlessly transition to and work with this modern, high-performance image codec within their existing workflows.