.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.48.1. .TH JPEG "1" "February 2021" "fake 1.58" "User Commands" .SH NAME jpeg \- jpeg compressor .SH SYNOPSIS .B jpeg [\fI\,options\/\fR] \fI\,source target\/\fR .SH DESCRIPTION jpeg Copyright (C) 2012\-2018 Thomas Richter, University of Stuttgart and Accusoft .PP For license conditions, see README.license for details. .PP default is to decode the jpeg input and write a ppm output use \fB\-q\fR [1..100] or \fB\-p\fR to enforce encoding .PP \fB\-q\fR quality : selects the encoding mode and defines the quality of the base image .PP \fB\-Q\fR quality : defines the quality for the extension layer .PP \fB\-quality\fR q : use a profile and part specific weighting between base and extension .IP layer quality .PP \fB\-r\fR : enable the residual codestream for HDR and lossless .IP coding, requires \fB\-q\fR and \fB\-Q\fR to define base and enhancement layer quality. .PP \fB\-r12\fR : use a 12 bit residual image instead of an 8 bit residual .IP image. .PP \fB\-rl\fR : enforce a int\-to\-int lossless DCT in the residual domain .IP for lossless coding enabled by \fB\-Q\fR 100 .PP \fB\-ro\fR : disable the DCT in the residual domain, quantize spatially for .IP near\-lossless coding .PP \fB\-ldr\fR file : specifies a separate file containing the base layer .IP for encoding. .PP \fB\-R\fR bits : specify refinement bits for the base images. .IP This works like \fB\-r\fR but in the DCT domain. .PP \fB\-rR\fR bits : specify refinement bits for the residual image. .PP \fB\-N\fR : enable noise shaping of the prediction residual .PP \fB\-U\fR : disable automatic upsampling .PP \fB\-l\fR : enable lossless coding without a residual image by an .IP int\-to\-int DCT, also requires \fB\-c\fR and \fB\-q\fR 100 for true lossless .PP \fB\-p\fR : JPEG lossless (predictive) mode .IP also requires \fB\-c\fR for true lossless .PP \fB\-c\fR : disable the RGB to YCbCr decorrelation transformation .PP \fB\-xyz\fR : indicates that the HDR image is in the XYZ colorspace .IP note that the image is not *converted* to this space, but is assumed to be encoded in this space. .PP \fB\-cxyz\fR : similar to the above, but uses the dedicated C transformation .IP to implement a XYZ colorspace conversion. .PP \fB\-sp\fR : use separate LUTs for each component. .PP \fB\-md\fR : use the median instead of the center of mass .IP for constructing the inverse TMO of ISO/IEC 18477\-7 profile C. .PP \fB\-ct\fR : use the center of mass instead of the median .IP for constructing the inverse TMO of ISO/IEC 18477\-7 profile C. .PP \fB\-sm\fR iter : use iterations to smooth out the histogram for .IP inverse\-TMO based algorithms. Default is not to smooth the histogram. .PP \fB\-ncl\fR : disable clamping of out\-of\-gamut colors. .IP this is automatically enabled for lossless. .PP \fB\-m\fR maxerr : defines a maximum pixel error for JPEG LS coding .PP \fB\-h\fR : optimize the Huffman tables .PP \fB\-a\fR : use arithmetic coding instead of huffman coding .IP available for all coding schemes (\fB\-p\fR,\-v,\-l and default) .PP \fB\-v\fR : use progressive instead of sequential encoding .IP available for all coding schemes (\fB\-r\fR,\-a,\-l and default) .PP \fB\-qv\fR : use a simplified scan pattern for progressive that only .IP separates AC from DC bands and may improve the performance .PP \fB\-d\fR : encode the DC band only (requires \fB\-p\fR) .PP \fB\-y\fR levels : hierarchical JPEG coding with the given number of decomposition .IP levels. If levels is zero, then a lossless coding mode for hierarchical is used in which the second lossless scan encodes the DCT residuals of the first scan. For that, \fB\-c\fR is suggested for true lossless. If levels is one, then the lossy initial scan is downscaled by a power of two. .PP \fB\-g\fR gamma : define the exponent for the gamma for the LDR domain, or rather, for .IP mapping HDR to LDR. A suggested value is 2.4 for mapping scRGB to sRBG. This option controls the base\-nonlinearity that generates the HDR pre\-cursor image from the LDR image. It is also used in the absence of \fB\-ldr\fR (i.e. no LDR image) to tonemap the HDR input image. Use \fB\-g\fR 0 to use an approximate inverse TMO as base\-nonlinearity, and for tonemapping with the Reinhard operator if the LDR image is missing. .PP \fB\-gf\fR file : define the inverse one\-point L\-nonlinearity on decoding from a file .IP this file contains one (ASCII encoded) digit per line, 256*2^h lines in total, where h is the number of refinement bits. Each line contains an (integer) output value the corresponding input is mapped to. .PP \fB\-z\fR mcus : define the restart interval size, zero disables it .PP \fB\-n\fR : indicate the image height by a DNL marker .PP \fB\-s\fR WxH,... : define subsampling factors for all components .IP note that these are NOT MCU sizes Default is 1x1,1x1,1x1 (444 subsampling) 1x1,2x2,2x2 is the 420 subsampling often used .PP \fB\-sr\fR WxH,...: define subsampling in the residual domain .PP \fB\-rs\fR : encode the residual image in sequential (rather than the modified residual) .IP coding mode .PP \fB\-rv\fR : encode the residual image in progressive coding mode .PP \fB\-ol\fR : open loop encoding, residuals are based on original, not reconstructed .PP \fB\-dz\fR : improved deadzone quantizer, may help to improve the R/D performance .PP \fB\-oz\fR : optimize quantizer, may help to improve the R/D performance .PP \fB\-dr\fR : include the optional de\-ringing (Gibbs Phenomenon) filter on encoding .SS "-qt n : define the quantization table. The following tables are currently defined:" .IP n = 0 the example tables from Rec. ITU\-T T.81 | ISO/IEC 10918\-1 (default) n = 1 a completely flat table that should be PSNR\-optimal n = 2 a MS\-SSIM optimized table n = 3 the table suggested by ImageMagick n = 4 a HSV\-PSNR optimized table n = 5 the table from Klein, Silverstein and Carney: .IP Relevance of human vision to JPEG\-DCT compression (1992) .IP n = 6 the table from Watson, Taylor, Borthwick: .IP DCTune perceptual optimization of compressed dental X\-Rays (1997) .IP n = 7 the table from Ahumada, Watson, Peterson: .IP A visual detection model for DCT coefficient quantization (1993) .IP n = 8 the table from Peterson, Ahumada and Watson: .IP An improved detection model for DCT coefficient quantization (1993) .PP \fB\-rqt\fR n : defines the quantization table for the residual stream in the same way .PP \fB\-al\fR file : specifies a one\-component pgm/pfm file that contains an alpha component .IP or the code will write the alpha component to. This demo code DOES NOT implement compositing of alpha and background .PP \fB\-am\fR mode : specifes the mode of the alpha: 1 (regular) 2 (premultiplied) 3 (matte\-removal) .PP \fB\-ab\fR r,g,b : specifies the matte (background) color for mode 3 as RGB triple .PP \fB\-ar\fR : enable residual coding for the alpha channel, required if the .IP alpha channel is larger than 8bpp .PP \fB\-ar12\fR : use a 12 bit residual for the alpha channel .PP \fB\-aR\fR bits : set refinement bits in the alpha base codestream .PP \fB\-arR\fR bits : set refinement bits in the residual alpha codestream .PP \fB\-aol\fR : enable open loop coding for the alpha channel .PP \fB\-adz\fR : enable the deadzone quantizer for the alpha channel .PP \fB\-aoz\fR : enable the quantization optimization for the alpha channel .PP \fB\-adr\fR : include the de\-ringing filter for the alpha channel .PP \fB\-all\fR : enable lossless DCT for alpha coding .PP \fB\-alo\fR : disable the DCT in the residual alpha channel, quantize spatially. .PP \fB\-aq\fR qu : specify a quality for the alpha base channel (usually the only one) .PP \fB\-aQ\fR qu : specify a quality for the alpha extension layer .PP \fB\-aqt\fR n : specify the quantization table for the alpha channel .PP \fB\-arqt\fR n : specify the quantization table for residual alpha .PP \fB\-aquality\fR q: specify a combined quality for both .PP \fB\-ra\fR : enable arithmetic coding for residual image (*NOT SPECIFIED*) .PP \fB\-ls\fR mode : encode in JPEG LS mode, where 0 is scan\-interleaved, .IP 1 is line interleaved and 2 is sample interleaved. NOTE THAT THIS IS NOT CONFORMING TO REC. ITU\-T T.81 | ISO/IEC 10918 BUT COMPLIANT TO REC. ITU\-T T.87 | ISO/IEC 14495\-1 (JPEG\-LS) WHICH IS A DIFFERENT STANDARD. Use \fB\-c\fR to bypass the YCbCr color transformation for true lossless, also use \fB\-c\fR for decoding images encoded by the UBC reference software as it does not write an indicator marker to disable the transformation itself. Note that the UBC implementation will not able to decode streams created by this software due to a limitation of the UBC code \- the streams are nevertheless fully conforming. .PP \fB\-cls\fR : Use a JPEG LS part\-2 conforming pseudo\-RCT color transformation. .IP Note that this transformation is only CONFORMING TO REC. ITU\-T T.870 | ISO/IEC 14495\-2 AND NOT CONFORMING TO REC. ITU\-T T.81 | ISO/IEC 10918\-1. Works for near\-lossless JPEG LS DO NOT USE FOR LOSSY JPEG, it will also create artifacts. .SH AUTHOR This manual page was written by Mathieu Malaterre for the Debian GNU/Linux system (but may be used by others).