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
32 -I Read the raw pixels from standard input in CPU byte order with
33 no header. Use dcraw -E -4 to get the raw pixel values.
34
35 -P deadpixels.txt
36 Read the dead pixel list from this file instead of ".badpixels".
37 See FILES for a description of the format.
38
39 -K darkframe.pgm
40 Subtract a dark frame from the raw data. To generate a dark
41 frame, shoot a raw photo with no light and do
42 dcraw -D -4 -j -t 0.
43
44 -k darkness
45 When shadows appear foggy, you need to raise the darkness level.
46 To measure this, apply pamsumm -mean to the dark frame generated
47 above.
48
49 -S saturation
50 When highlights appear pink, you need to lower the saturation
51 level. To measure this, take a picture of something shiny and
52 do dcraw -D -4 -j -c photo.raw | pamsumm -max
53
54 The default darkness and saturation are usually correct.
55
56 -n noise_threshold
57 Use wavelets to erase noise while preserving real detail. The
58 best threshold should be somewhere between 100 and 1000.
59
60 -C red_mag blue_mag
61 Enlarge the raw red and blue layers by the given factors, typi‐
62 cally 0.999 to 1.001, to correct chromatic aberration.
63
64 -H 0 Clip all highlights to solid white (default).
65
66 -H 1 Leave highlights unclipped in various shades of pink.
67
68 -H 2 Blend clipped and unclipped values together for a gradual fade
69 to white.
70
71 -H 3+ Reconstruct highlights. Low numbers favor whites; high numbers
72 favor colors. Try -H 5 as a compromise. If that's not good
73 enough, do -H 9, cut out the non-white highlights, and paste
74 them into an image generated with -H 3.
75
77 By default, dcraw uses a fixed white balance based on a color chart
78 illuminated with a standard D65 lamp.
79
80 -w Use the white balance specified by the camera. If this is not
81 found, print a warning and use another method.
82
83 -a Calculate the white balance by averaging the entire image.
84
85 -A left top width height
86 Calculate the white balance by averaging a rectangular area.
87 First do dcraw -j -t 0 and select an area of neutral grey color.
88
89 -r mul0 mul1 mul2 mul3
90 Specify your own raw white balance. These multipliers can be
91 cut and pasted from the output of dcraw -v.
92
93 +M or -M
94 Use (or don't use) any color matrix from the camera metadata.
95 The default is +M if -w is set, -M otherwise. This option only
96 affects Olympus, Leaf, and Phase One cameras.
97
98 -o [0-5]
99 Select the output colorspace when the -p option is not used:
100
101 0 Raw color (unique to each camera)
102 1 sRGB D65 (default)
103 2 Adobe RGB (1998) D65
104 3 Wide Gamut RGB D65
105 4 Kodak ProPhoto RGB D65
106 5 XYZ
107
108 -p camera.icm [ -o output.icm ]
109 Use ICC profiles to define the camera's raw colorspace and the
110 desired output colorspace (sRGB by default).
111
112 -p embed
113 Use the ICC profile embedded in the raw photo.
114
116 -d Show the raw data as a grayscale image with no interpolation.
117 Good for photographing black-and-white documents.
118
119 -D Same as -d, but with the original unscaled pixel values.
120
121 -E Same as -D, but masked pixels are not cropped.
122
123 -h Output a half-size color image. Twice as fast as -q 0.
124
125 -q 0 Use high-speed, low-quality bilinear interpolation.
126
127 -q 1 Use Variable Number of Gradients (VNG) interpolation.
128
129 -q 2 Use Patterned Pixel Grouping (PPG) interpolation.
130
131 -q 3 Use Adaptive Homogeneity-Directed (AHD) interpolation.
132
133 -f Interpolate RGB as four colors. Use this if the output shows
134 false 2x2 meshes with VNG or mazes with AHD.
135
136 -m number_of_passes
137 After interpolation, clean up color artifacts by repeatedly
138 applying a 3x3 median filter to the R-G and B-G channels.
139
141 By default, dcraw writes PGM/PPM/PAM with 8-bit samples, a BT.709 gamma
142 curve, a histogram-based white level, and no metadata.
143
144 -W Use a fixed white level, ignoring the image histogram.
145
146 -b brightness
147 Divide the white level by this number, 1.0 by default.
148
149 -g power toe_slope
150 Set the gamma curve, by default BT.709 (-g 2.222 4.5). If you
151 prefer sRGB gamma, use -g 2.4 12.92. For a simple power curve,
152 set the toe slope to zero.
153
154 -6 Write sixteen bits per sample instead of eight.
155
156 -4 Linear 16-bit, same as -6 -W -g 1 1.
157
158 -T Write TIFF with metadata instead of PGM/PPM/PAM.
159
160 -t [0-7,90,180,270]
161 Flip the output image. By default, dcraw applies the flip spec‐
162 ified by the camera. -t 0 disables all flipping.
163
164 -j For Fuji Super CCD cameras, show the image tilted 45 degrees.
165 For cameras with non-square pixels, do not stretch the image to
166 its correct aspect ratio. In any case, this option guarantees
167 that each output pixel corresponds to one raw pixel.
168
169 -s [0..N-1] or -s all
170 If a file contains N raw images, choose one or "all" to decode.
171 For example, Fuji Super CCD SR cameras generate a second image
172 underexposed four stops to show detail in the highlights.
173
175 ./.badpixels, ../.badpixels, ../../.badpixels, ...
176 List of your camera's dead pixels, so that dcraw can interpolate
177 around them. Each line specifies the column, row, and UNIX time
178 of death for one pixel. For example:
179
180 962 91 1028350000 # died between August 1 and 4, 2002
181 1285 1067 0 # don't know when this pixel died
182
183 These coordinates are before any cropping or rotation, so use
184 dcraw -j -t 0 to locate dead pixels.
185
187 pgm(5), ppm(5), pam(5), pamsumm(1), pnmgamma(1), pnmtotiff(1), pnm‐
188 topng(1), gphoto2(1), cjpeg(1), djpeg(1)
189
191 Written by David Coffin, dcoffin a cybercom o net
192
193
194
195 May 14, 2009 dcraw(1)