OS Manuals

/usr/bin/djpeg

Utilities for manipulating JPEG images

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

usage: /usr/bin/djpeg [switches] [inputfile]
Switches (names may be abbreviated):
  -colors N      Reduce image to no more than N colors [legacy feature]
  -fast          Low-quality processing [legacy feature]
  -grayscale     Force grayscale output
  -rgb           Force RGB output
  -rgb565        Force RGB565 output
  -scale M/N     Scale output image by fraction M/N, eg, 1/8
  -bmp           Select BMP output format (Windows style)
  -gif           Select GIF output format (LZW-compressed) [legacy feature]
  -gif0          Select GIF output format (uncompressed) [legacy feature]
  -os2           Select BMP output format (OS/2 style) [legacy feature]
  -png           Select PNG output format
  -pnm           Select PBMPLUS (PPM/PGM) output format (default)
  -targa         Select Targa output format [legacy feature]
Switches for advanced users:
  -precision 12  Force 12-bit-per-sample output [useful for shadow recovery]
  -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]
  -dither fs     Use Floyd-Steinberg dithering when quantizing colors (default)
                 [legacy feature]
  -dither none   Don't use dithering when quantizing colors [legacy feature]
  -dither ordered  Use ordered dithering when quantizing colors
                   [legacy feature]
  -icc FILE      Extract ICC profile to FILE
  -noicc         Do not transfer ICC profile to PNG output file
  -map FILE      Quantize to colors used in named image file [legacy feature]
  -nosmooth      Use faster, lower-quality upsampling
  -onepass       Use 1-pass color quantization (low quality) [legacy feature]
  -maxmemory N   Maximum memory to use (in kbytes)
  -maxscans N    Maximum number of scans to allow in input file
  -outfile name  Specify name for output file
  -nooverwrite   Don't overwrite output file if it exists
  -memsrc        Load input file into memory before decompressing
  -report        Report decompression progress
  -skip Y0,Y1    Decompress all rows except those between Y0 and Y1 (inclusive)
  -crop WxH+X+Y  Decompress only a rectangular subregion of the image
                 [requires PNG, PBMPLUS (PPM/PGM), Targa, or GIF output format]
  -strict        Treat all warnings as fatal
  -verbose  or  -debug   Emit debug output
  -version       Print version information and exit
Options (34)
OptionDescriptionSource
-colors NReduce image to no more than N colors [legacy feature]help + man
-fastSelect recommended processing options for low-quality output [legacy feature].help + man
-grayscaleForce grayscale output even if JPEG file is full-color.help + man
-rgbForce RGB output even if JPEG file is grayscale.help + man
-rgb565Force RGB565 outputhelp
-scale M/NScale output image by fraction M/N, eg, 1/8help + man
-bmpSelect BMP output format (Windows flavor).help + man
-gifSelect GIF output format (LZW-compressed) [legacy feature].help + man
-gif0Select GIF output format (uncompressed) [legacy feature].help + man
-os2Select BMP output format (OS/2 1.x flavor) [legacy feature].help + man
-pngSelect PNG output format.help + man
-pnmSelect PBMPLUS (PPM/PGM) output format (this is the default format).help + man
-targaSelect Targa output format [legacy feature].help + man
-precision 12Decompress an 8-bit-per-sample lossy JPEG image to a 12-bit-per-sample output image.help + man
-dct intUse accurate integer DCT method (default).help + man
-dither fsUse Floyd-Steinberg dithering when quantizing colors (default) [legacy feature]help + man
-icc FILEExtract ICC color management profile to the specified file.help + man
-noiccDo not transfer the embedded ICC color management profile (if any) from the JPEG file to a PNG output image.help + man
-map FILEQuantize to the colors used in the specified image file [legacy feature].help + man
-nosmoothUse a faster, lower-quality upsampling routine.help + man
-onepassUse one-pass instead of two-pass color quantization [legacy feature].help + man
-maxmemory NSet limit for amount of memory to use in processing large images.help + man
-maxscans NAbort if the JPEG image contains more than N scans.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
-memsrcLoad input file into memory before decompressing.help + man
-reportReport decompression progress.help + man
-skip Y0Decompress all rows of the JPEG image except those between Y0 and Y1 (inclusive.) Note that if decompression scaling is being used, then Y0 and Y1 are relative to the scaled image dimensions.help + man
-crop WxH+X+YDecompress only a rectangular subregion of the image [requires PNG, PBMPLUS (PPM/PGM), Targa, or GIF output format]help + man
-strictTreat all warnings as fatal.help + man
-verboseor -debug Emit debug outputhelp + man
-versionPrint version information and exit.help + man
-quantize NSame as -colors. (in the manual page but not in --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.