CJPEG(1) General Commands Manual CJPEG(1) (NAME) cjpeg - JPEG (SYNOPSIS) cjpeg [ options ] [ filename ] (DESCRIPTION) cjpeg JPEG/JFIF . : PNG PPM ( PBMPLUS) PGM ( PBMPLUS) BMP GIF [ ] Targa [ ]. (OPTIONS) -grayscale -gray -gr . <<>> . ( -BMP -bmp ). ( -greyscale) . : -quality N[,...] . 0 () 100 () 75 . ( .) -grayscale JPEG ( ) . -grayscale JPEG . -rgb JPEG RGB. RGB JPEG YCbCr . -optimize . . -optimize JPEG cjpeg . -optimize . -progressive JPEG (progressive) ( ). -optimize -arithmetic . -targa Targa [ ]. Targa <> cjpeg . -targa cjpeg Targa . Targa . -quality : JPEG . ( ) . 50 95 ( 75 ). -quality 75 5 10 . ( .) -quality 100 1 ( ). 95 ( PSNR SSIM) . 50 . 5 10 . -quality 2 ( ) . (: 25 2 JPEG . cjpeg JPEG . -baseline .) -quality cjpeg (luminance) (chrominance) ( ) . : . . . -quality . q . ( 0 1) cjpeg v6b . ( ) -qtables -qslots ( <<>> ). JPEG JPEG . : -sample 1x1 cjpeg . (2x2 <<4:2:0>>) . -progressive <>> . JPEG (scan) . . JPEG -- -- . : -precision N JPEG N . N 2 16 8 . N 8 12 -lossless . PBMPLUS 8 . PBMPLUS . -verbose cjpeg . : 8 JPEG . -precision 12 -optimize -arithmetic . -lossless psv[,Pt] JPEG (lossless) (1 7) (0 precision - 1 precision JPEG ). 0 () JPEG . ( ). : JPEG JPEG . JPEG JPEG (lossy) . JPEG : - / - ( JPEG ) - - DCT/IDCT - (Smoothing) - (Downsampling/upsampling) - IDCT - - jpegtran . -arithmetic (arithmetic coding). : JPEG JPEG . -dct int DCT (). -dct fast DCT [ ]. Independent JPEG Group 1991 JPEG . DCT fast . libjpeg-turbo JPEG fast . x86/x86-64 AVX2 fast int . fast 5 15 int . 90 . 90 fast int . 97 fast 1 3 PSNR int . fast 97 . 98 . libjpeg- turbo fast 97 int . -dct float DCT [ ]. float int . float . -icc file ICC . -noicc PNG ICC . -noicc ICC ( ) PNG. -restart N (restart marker) N MCU N MCU <> . JPEG MCU ( - Minimum Coded Unit) << >> ( DCT 8x8 ) . ( MCU JPEG 4:2:2 ). JPEG MCU . MCU MCU . -restart 0 () . -smooth N (dithering). N 1 100 . 0 () . -maxmemory N . <> . -max 4m 4000000 . . -outfile name . -nooverwrite . -memdst . (jpeg_mem_dest()) / . -report . -strict . GIF LZW . -verbose . -v . . -debug -verbose. -version . -restart JPEG . . . -restart 1 Usenet . -smooth . JPEG : 10 50 JPEG . . (wizard): -baseline (baseline). 8 . ( JPEG . -baseline -progressive .) -qtables file . -qslots N[,...] . -sample HxV[,...] JPEG . -scans file . <<>> JPEG . . wizard.txt . (EXAMPLES) PPM foo.ppm 60 foo.jpg : cjpeg -quality 60 foo.ppm > foo.jpg (HINTS) GIF JPEG JPEG (24 48 ) . . GIF JPEG . GIF JPEG -quality -smooth cjpeg . -smooth 10 . / JPEG . . JPEG . -optimize cjpeg <<>> . JPEG . ( JPEG -optimize .) (ENVIRONMENT) JPEGMEM . -maxmemory . JPEGMEM -maxmemory . (SEE ALSO) djpeg(1), jpegtran(1), rdjpgcom(1), wrjpgcom(1) ppm(5), pgm(5) Wallace, Gregory K. "The JPEG Still Picture Compression Standard", Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44. (AUTHORS) Independent JPEG Group The libjpeg-turbo Project libjpeg-turbo libjpeg . (ISSUES) BMP Targa . 24 March 2026 CJPEG(1)