Linux command
djpeg 命令
文本
涉及管道、覆盖或删除,执行前请先确认路径和参数。
常用示例
Decompress JPEG
djpeg [image.jpg] > [output.ppm]
Decompress to BMP
djpeg -bmp [image.jpg] > [output.bmp]
Decompress to GIF
djpeg -gif [image.jpg] > [output.gif]
Scale output
djpeg -scale [1/2] [image.jpg] > [output.ppm]
Output grayscale only
djpeg -grayscale [image.jpg] > [output.ppm]
Show verbose info
djpeg -verbose [image.jpg] > [output.ppm]
说明
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.
参数
- -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.
FAQ
What is the djpeg command used for?
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.
How do I run a basic djpeg example?
Run `djpeg [image.jpg] > [output.ppm]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -bmp do in djpeg?
Output BMP format.