1dcraw(1) General Commands Manual dcraw(1)
2
3
4
6 dcraw - command-line decoder for raw digital photos
7
9 dcraw [OPTION]... [FILE]...
10
12 dcraw decodes raw photos, displays metadata, and extracts thumbnails.
13
15 -v Print verbose messages, not just warnings and errors.
16
17 -c Write decoded images or thumbnails to standard output.
18
19 -e Extract the camera-generated thumbnail, not the raw image.
20 You'll get either a JPEG or a PPM file, depending on the camera.
21
22 -z Change the access and modification times of an AVI, JPEG, TIFF
23 or raw file to when the photo was taken, assuming that the cam‐
24 era clock was set to Universal Time.
25
26 -i Identify files but don't decode them. Exit status is 0 if dcraw
27 can decode the last file, 1 if it can't. -i -v shows metadata.
28
29 dcraw cannot decode JPEG files!!
30
31 -d Show the raw data as a grayscale image with no interpolation.
32 Good for photographing black-and-white documents.
33
34 -D Same as -d, but totally raw (no color scaling).
35
36 -h Output a half-size color image. Twice as fast as -q 0.
37
38 -q 0 Use high-speed, low-quality bilinear interpolation.
39
40 -q 1 Use Variable Number of Gradients (VNG) interpolation.
41
42 -q 2 Use Patterned Pixel Grouping (PPG) interpolation.
43
44 -q 3 Use Adaptive Homogeneity-Directed (AHD) interpolation.
45
46 -f Interpolate RGB as four colors. Use this if the output shows
47 false 2x2 meshes with VNG or mazes with AHD.
48
49 -m number_of_passes
50 After interpolation, clean up color artifacts by repeatedly
51 applying a 3x3 median filter to the R-G and B-G channels.
52
53 -n noise_threshold
54 Use wavelets to erase noise while preserving real detail. The
55 best threshold should be somewhere between 100 and 1000.
56
57 -b brightness
58 By default, dcraw writes 8-bit PGM/PPM/PAM with a BT.709 gamma
59 curve and a 99th-percentile white point. If the result is too
60 light or too dark, -b lets you adjust it. Default is 1.0.
61
62 -4 Write 16-bit linear pseudo-PGM/PPM/PAM with no gamma curve, no
63 white point, and no -b option.
64
65 -T Write TIFF output (with metadata) instead of PGM/PPM/PAM.
66
67 -k black
68 Set the black point. Default depends on the camera.
69
70 -K darkframe.pgm
71 Subtract a dark frame from the raw data. To generate a dark
72 frame, shoot a raw photo with no light and do
73 dcraw -D -4 -j -t 0.
74
75 -w Use the white balance specified by the camera. If this is not
76 found, print a warning and use another method.
77
78 -a Calculate the white balance by averaging the entire image.
79
80 -A left top width height
81 Calculate the white balance by averaging a rectangular area.
82 First do dcraw -j -t 0 and select an area of neutral grey color.
83
84 -r mul0 mul1 mul2 mul3
85 Specify your own raw white balance. These multipliers can be
86 cut and pasted from the output of dcraw -v.
87
88 no white balance option
89 Use a fixed white balance based on a color chart illuminated
90 with a standard D65 lamp.
91
92 +M or -M
93 Use (or don't use) any color matrix from the camera metadata.
94 The default is +M if -w is set, -M otherwise. This option only
95 affects Olympus, Leaf, and Phase One cameras.
96
97 -C red_mag blue_mag
98 Enlarge the raw red and blue layers by the given factors, typi‐
99 cally 0.999 to 1.001, to correct chromatic aberration.
100
101 -H 0 Clip all highlights to solid white (default).
102
103 -H 1 Leave highlights unclipped in various shades of pink.
104
105 -H 2 Blend clipped and unclipped values together for a gradual fade
106 to white.
107
108 -H 3-9 Reconstruct highlights. Low numbers favor whites; high numbers
109 favor colors. Try -H 5 as a compromise. If that's not good
110 enough, do -H 9, cut out the non-white highlights, and paste
111 them into an image generated with -H 3.
112
113 -o [0-5]
114 Select the output colorspace when the -p option is not used:
115
116 0 Raw color (unique to each camera)
117 1 sRGB D65 (default)
118 2 Adobe RGB (1998) D65
119 3 Wide Gamut RGB D65
120 4 Kodak ProPhoto RGB D65
121 5 XYZ
122
123 -p camera.icm [ -o output.icm ]
124 Use ICC profiles to define the camera's raw colorspace and the
125 desired output colorspace (sRGB by default).
126
127 -p embed
128 Use the ICC profile embedded in the raw photo.
129
130 -t [0-7,90,180,270]
131 Flip the output image. By default, dcraw applies the flip spec‐
132 ified by the camera. -t 0 disables all flipping.
133
134 -s [0..N-1] or -s all
135 If a file contains N raw images, choose one or "all" to decode.
136 For example, Fuji Super CCD SR cameras generate a second image
137 underexposed four stops to show detail in the highlights.
138
139 -j For Fuji Super CCD cameras, show the image tilted 45 degrees.
140 For cameras with non-square pixels, do not stretch the image to
141 its correct aspect ratio. In any case, this option guarantees
142 that each output pixel corresponds to one raw pixel.
143
145 ./.badpixels, ../.badpixels, ../../.badpixels, ...
146 List of your camera's dead pixels, so that dcraw can interpolate
147 around them. Each line specifies the column, row, and UNIX time
148 of death for one pixel. For example:
149
150 962 91 1028350000 # died between August 1 and 4, 2002
151 1285 1067 0 # don't know when this pixel died
152
153 These coordinates are before any cropping or rotation, so use
154 dcraw -j -t 0 to locate dead pixels.
155
157 pgm(5), ppm(5), pam(5), pnmgamma(1), pnmtotiff(1), pnmtopng(1),
158 gphoto2(1), cjpeg(1), djpeg(1)
159
161 Written by David Coffin, dcoffin a cybercom o net
162
163
164
165 October 30, 2007 dcraw(1)