-
-
Notifications
You must be signed in to change notification settings - Fork 40
/
dcraw.1
292 lines (291 loc) · 6.81 KB
/
dcraw.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
.\"
.\" Man page for dcraw
.\"
.\" Copyright (c) 2015 by David Coffin
.\"
.\" You may distribute without restriction.
.\"
.\" David Coffin
.\" dcoffin a cybercom o net
.\" http://www.cybercom.net/~dcoffin
.\"
.TH dcraw 1 "March 3, 2015"
.LO 1
.SH NAME
dcraw - command-line decoder for raw digital photos
.SH SYNOPSIS
.B dcraw
[\fIOPTION\fR]... [\fIFILE\fR]...
.SH DESCRIPTION
.B dcraw
decodes raw photos, displays metadata, and extracts thumbnails.
.SH GENERAL OPTIONS
.TP
.B -v
Print verbose messages, not just warnings and errors.
.TP
.B -c
Write decoded images or thumbnails to standard output.
.TP
.B -e
Extract the camera-generated thumbnail, not the raw image.
You'll get either a JPEG or a PPM file, depending on the camera.
.TP
.B -z
Change the access and modification times of an AVI, JPEG, TIFF or raw
file to when the photo was taken, assuming that the camera clock
was set to Universal Time.
.TP
.B -i
Identify files but don't decode them.
Exit status is 0 if
.B dcraw
can decode the last file, 1 if it can't.
.B -i -v
shows metadata.
.TP
.B ""
.B dcraw
cannot decode JPEG files!!
.SH REPAIR OPTIONS
.TP
.B -I
Read the raw pixels from standard input in CPU byte order with
no header. Use
.B dcraw -E -4
to get the raw pixel values.
.TP
.B -P deadpixels.txt
Read the dead pixel list from this file instead of ".badpixels".
See
.B FILES
for a description of the format.
.TP
.B -K darkframe.pgm
Subtract a dark frame from the raw data. To generate a
dark frame, shoot a raw photo with no light and do
.BR dcraw\ -D\ -4\ -j\ -t\ 0 .
.TP
.B -k darkness
When shadows appear foggy, you need to raise the darkness level.
To measure this, apply
.B pamsumm -mean
to the dark frame generated above.
.TP
.B -S saturation
When highlights appear pink, you need to lower the saturation level.
To measure this, take a picture of something shiny and do
.B dcraw -D -4 -j -c
photo.raw
.B | pamsumm -max
.TP
.B ""
The default darkness and saturation are usually correct.
.TP
.B -n noise_threshold
Use wavelets to erase noise while preserving real detail.
The best threshold should be somewhere between 100 and 1000.
.TP
.B -C red_mag blue_mag
Enlarge the raw red and blue layers by the given factors,
typically 0.999 to 1.001, to correct chromatic aberration.
.TP
.B -H 0
Clip all highlights to solid white (default).
.TP
.B -H 1
Leave highlights unclipped in various shades of pink.
.TP
.B -H 2
Blend clipped and unclipped values together for a gradual fade
to white.
.TP
.B -H 3+
Reconstruct highlights. Low numbers favor whites; high numbers
favor colors. Try
.B -H 5
as a compromise. If that's not good enough, do
.BR -H\ 9 ,
cut out the non-white highlights, and paste them into an image
generated with
.BR -H\ 3 .
.SH COLOR OPTIONS
By default,
.B dcraw
uses a fixed white balance based on a color chart illuminated
with a standard D65 lamp.
.TP
.B -w
Use the white balance specified by the camera.
If this is not found, print a warning and use another method.
.TP
.B -a
Calculate the white balance by averaging the entire image.
.TP
.B -A left top width height
Calculate the white balance by averaging a rectangular area.
First do
.B dcraw\ -j\ -t\ 0
and select an area of neutral grey color.
.TP
.B -r mul0 mul1 mul2 mul3
Specify your own raw white balance.
These multipliers can be cut and pasted from the output of
.BR dcraw\ -v .
.TP
.BR +M " or " -M
Use (or don't use) any color matrix from the camera metadata.
The default is
.B +M
if
.B -w
is set or the photo is in DNG format,
.B -M
otherwise. Besides DNG,
this option only affects Olympus, Leaf, and Phase One cameras.
.TP
.B -o [0-6]
Select the output colorspace when the
.B -p
option is not used:
.B \t0
\ \ Raw color (unique to each camera)
.br
.B \t1
\ \ sRGB D65 (default)
.br
.B \t2
\ \ Adobe RGB (1998) D65
.br
.B \t3
\ \ Wide Gamut RGB D65
.br
.B \t4
\ \ Kodak ProPhoto RGB D65
.br
.B \t5
\ \ XYZ
.br
.B \t6
\ \ ACES
.TP
.BR -p\ camera.icm \ [\ -o\ output.icm \ ]
Use ICC profiles to define the camera's raw colorspace and the
desired output colorspace (sRGB by default).
.TP
.B -p embed
Use the ICC profile embedded in the raw photo.
.SH INTERPOLATION OPTIONS
.TP
.B -d
Show the raw data as a grayscale image with no interpolation.
Good for photographing black-and-white documents.
.TP
.B -D
Same as
.BR -d ,
but with the original unscaled pixel values.
.TP
.B -E
Same as
.BR -D ,
but masked pixels are not cropped.
.TP
.B -h
Output a half-size color image. Twice as fast as
.BR -q\ 0 .
.TP
.B -q 0
Use high-speed, low-quality bilinear interpolation.
.TP
.B -q 1
Use Variable Number of Gradients (VNG) interpolation.
.TP
.B -q 2
Use Patterned Pixel Grouping (PPG) interpolation.
.TP
.B -q 3
Use Adaptive Homogeneity-Directed (AHD) interpolation.
.TP
.B -f
Interpolate RGB as four colors. Use this if the output shows
false 2x2 meshes with VNG or mazes with AHD.
.TP
.B -m number_of_passes
After interpolation, clean up color artifacts by repeatedly
applying a 3x3 median filter to the R-G and B-G channels.
.SH OUTPUT OPTIONS
By default,
.B dcraw
writes PGM/PPM/PAM with 8-bit samples, a BT.709 gamma curve,
a histogram-based white level, and no metadata.
.TP
.B -W
Use a fixed white level, ignoring the image histogram.
.TP
.B -b brightness
Divide the white level by this number, 1.0 by default.
.TP
.B -g power toe_slope
Set the gamma curve, by default BT.709
.RB ( -g\ 2.222\ 4.5 ).
If you prefer sRGB gamma, use
.BR -g\ 2.4\ 12.92 .
For a simple power curve, set the toe slope to zero.
.TP
.B -6
Write sixteen bits per sample instead of eight.
.TP
.B -4
Linear 16-bit, same as
.BR -6\ -W\ -g\ 1\ 1 .
.TP
.B -T
Write TIFF with metadata instead of PGM/PPM/PAM.
.TP
.B -t [0-7,90,180,270]
Flip the output image. By default,
.B dcraw
applies the flip specified by the camera.
.B -t 0
disables all flipping.
.TP
.B -j
For Fuji\ Super\ CCD cameras, show the image tilted 45 degrees.
For cameras with non-square pixels, do not stretch the image to
its correct aspect ratio. In any case, this option guarantees
that each output pixel corresponds to one raw pixel.
.TP
.BR "-s [0..N-1]" " or " "-s all"
If a file contains N raw images, choose one or "all" to decode.
For example, Fuji\ Super\ CCD\ SR cameras generate a second image
underexposed four stops to show detail in the highlights.
.SH FILES
.TP
\:./.badpixels, ../.badpixels, ../../.badpixels, ...
List of your camera's dead pixels, so that
.B dcraw
can interpolate around them. Each line specifies the column,
row, and UNIX time of death for one pixel. For example:
.sp 1
.nf
962 91 1028350000 # died between August 1 and 4, 2002
1285 1067 0 # don't know when this pixel died
.fi
.sp 1
These coordinates are before any stretching or rotation, so use
.B dcraw -j -t 0
to locate dead pixels.
.SH "SEE ALSO"
.BR pgm (5),
.BR ppm (5),
.BR pam (5),
.BR pamsumm (1),
.BR pnmgamma (1),
.BR pnmtotiff (1),
.BR pnmtopng (1),
.BR gphoto2 (1),
.BR cjpeg (1),
.BR djpeg (1)
.SH AUTHOR
Written by David Coffin, dcoffin a cybercom o net