djpeg
TLDR
Decompress JPEG to PPM
SYNOPSIS
djpeg [options] [file]
DESCRIPTION
djpeg decompresses JPEG images to various uncompressed or lossless formats. It's part of the libjpeg/libjpeg-turbo package and provides command-line JPEG decoding with format conversion.
The tool reads JPEG files and outputs PPM, BMP, GIF, or Targa format. Scaling during decompression is efficient as it uses DCT coefficient scaling rather than full decompression followed by resizing.
djpeg is useful for batch processing, scripting, and converting JPEG images to formats suitable for further processing with other tools.
PARAMETERS
FILE
Input JPEG file (stdin if omitted).-bmp
Output BMP format.-gif
Output GIF format.-ppm
Output PPM format (default).-targa
Output Targa format.-scale M/N
Scale output by fraction.-grayscale
Output grayscale only.-colors N
Quantize to N colors.-verbose, -debug
Show debug information.
CAVEATS
Output goes to stdout by default (redirect to file). Color quantization for GIF may lose quality. Not all JPEG features supported equally. Progressive JPEG processing requires buffering.
HISTORY
djpeg is part of the libjpeg project created by the Independent JPEG Group (IJG) starting in 1991. libjpeg-turbo, a high-performance fork, provides compatible djpeg with SIMD optimizations.


