← 返回命令列表

Linux command

dcraw 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Convert RAW to PPM with default settings

dcraw [image.raw]

Convert to 16-bit linear TIFF

dcraw -T -4 [image.raw]

Extract embedded JPEG thumbnail

dcraw -e [image.raw]

Convert with automatic white balance

dcraw -a [image.raw]

Convert with camera white balance

dcraw -w [image.raw]

Output to stdout as PPM

dcraw -c [image.raw] > [output.ppm]

Half-size output

dcraw -h [image.raw]

说明

dcraw is a universal RAW image decoder that converts proprietary camera RAW formats to standard PPM or TIFF images. It supports hundreds of camera models from all major manufacturers. The tool performs demosaicing (converting Bayer pattern to full color), white balance, gamma correction, and color space conversion. Output can be 8-bit or 16-bit, linear or gamma-corrected, depending on intended use. dcraw is often used as a backend by other applications (GIMP, digiKam) or in batch processing pipelines. Its predictable, consistent behavior makes it valuable for automated processing where reproducibility matters.

参数

-c
Write to stdout.
-e
Extract embedded thumbnail.
-T
Output TIFF instead of PPM.
-4
Linear 16-bit, no gamma curve.
-6
16-bit output with gamma curve.
-w
Use camera white balance.
-a
Calculate white balance from entire image.
-W
Don't automatically brighten image.
-h
Half-size output (2x2 pixels averaged).
-q _n_
Interpolation quality (0-3).
-o _n_
Output colorspace (0=raw, 1=sRGB, 2=AdobeRGB, etc.).
-v
Verbose output.
-i
Identify file, don't decode.

FAQ

What is the dcraw command used for?

dcraw is a universal RAW image decoder that converts proprietary camera RAW formats to standard PPM or TIFF images. It supports hundreds of camera models from all major manufacturers. The tool performs demosaicing (converting Bayer pattern to full color), white balance, gamma correction, and color space conversion. Output can be 8-bit or 16-bit, linear or gamma-corrected, depending on intended use. dcraw is often used as a backend by other applications (GIMP, digiKam) or in batch processing pipelines. Its predictable, consistent behavior makes it valuable for automated processing where reproducibility matters.

How do I run a basic dcraw example?

Run `dcraw [image.raw]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -c do in dcraw?

Write to stdout.