OS Manuals

/usr/bin/cjpeg

Utilities for manipulating JPEG images

From libjpeg-turbo-utils 3.2.1-r0 (os), captured 2026-11-05 by running cjpeg --help (exit 1). permalink

usage: /usr/bin/cjpeg [switches] [inputfile]
Switches (names may be abbreviated):
  -quality N[,...]   Compression quality (0..100; 5-95 is most useful range,
                     default is 75)
  -grayscale     Create monochrome JPEG file
  -rgb           Create RGB JPEG file
  -optimize      Optimize Huffman table (smaller file, but slow compression)
  -progressive   Create progressive JPEG file
  -targa         Input file is Targa format (usually not needed)
Switches for advanced users:
  -precision N   Create JPEG file with N-bit data precision
                 (N=2..16; default is 8; if N is not 8 or 12, then -lossless
                 must also be specified)
  -lossless psv[,Pt]  Create lossless JPEG file
  -arithmetic    Use arithmetic coding
  -dct int       Use accurate integer DCT method (default)
  -dct fast      Use less accurate integer DCT method [legacy feature]
  -dct float     Use floating-point DCT method [legacy feature]
  -icc FILE      Embed ICC profile contained in FILE
  -noicc         Do not transfer ICC profile from PNG input file
  -restart N     Set restart interval in rows, or in blocks with B
  -smooth N      Smooth dithered input (N=1..100 is strength)
  -maxmemory N   Maximum memory to use (in kbytes)
  -outfile name  Specify name for output file
  -nooverwrite   Don't overwrite output file if it exists
  -memdst        Compress to memory instead of file (useful for benchmarking)
  -report        Report compression progress
  -strict        Treat all warnings as fatal
  -verbose  or  -debug   Emit debug output
  -version       Print version information and exit
Switches for wizards:
  -baseline      Force baseline quantization tables
  -qtables FILE  Use quantization tables given in FILE
  -qslots N[,...]    Set component quantization tables
  -sample HxV[,...]  Set component sampling factors
  -scans FILE    Create multi-scan JPEG per script FILE
Options (28)
OptionDescriptionSource
-quality NCompression quality (0..100;help
-grayscaleCreate monochrome JPEG file from color input.help + man
-rgbCreate RGB JPEG file.help + man
-optimizeOptimize Huffman table (smaller file, but slow compression)help + man
-progressiveCreate progressive JPEG file (see below).help + man
-targaInput file is Targa format (usually not needed)help + man
-precision NCreate JPEG file with N-bit data precision (N=2..16;help + man
-lossless psvCreate lossless JPEG filehelp
-arithmeticUse arithmetic coding.help + man
-dct intUse accurate integer DCT method (default).help + man
-icc FILEEmbed ICC color management profile contained in the specified file.help + man
-noiccDo not transfer the embedded ICC color management profile (if any) from a PNG input file.help + man
-restart NEmit a JPEG restart marker every N MCU rows, or every N MCUs if "B" is attached to the number.help + man
-smooth NSmooth the input image to eliminate dithering noise.help + man
-maxmemory NSet limit for amount of memory to use in processing large images.help + man
-outfile nameSend output image to the named file, not to standard output.help + man
-nooverwriteDon't overwrite output file if it exists.help + man
-memdstCompress to memory instead of file (useful for benchmarking)help + man
-reportReport compression progress.help + man
-strictTreat all warnings as fatal.help + man
-verboseor -debug Emit debug outputhelp + man
-versionPrint version information and exit.help + man
-baselineForce baseline-compatible quantization tables to be generated.help + man
-qtables FILEUse the quantization tables given in the specified text file.help + man
-qslots NSet component quantization tableshelp
-sample HxVSet component sampling factorshelp
-scans FILEUse the scan script given in the specified text file.help + man
-debugSame as -verbose. (in the manual page but not in --help)man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.