<META http-equiv="Content-Type" content="text/html; charset=UTF-8"> <HTML><HEAD><TITLE>Manpage of dcraw</TITLE> </HEAD><BODY> <H1>dcraw</H1> Section: User Commands (1)<BR>Updated: February 6, 2008<BR><A HREF="#index">Index</A> <A HREF="../index.html">Return to Main Contents</A><HR> <A NAME="lbAB"> </A> <H2>NAME</H2> dcraw - command-line decoder for raw digital photos <A NAME="lbAC"> </A> <H2>SYNOPSIS</H2> <B>dcraw</B> [<I>OPTION</I>]... [<I>FILE</I>]... <A NAME="lbAD"> </A> <H2>DESCRIPTION</H2> <B>dcraw</B> decodes raw photos, displays metadata, and extracts thumbnails. <A NAME="lbAE"> </A> <H2>GENERAL OPTIONS</H2> <DL COMPACT> <DT><B>-v</B> <DD> Print verbose messages, not just warnings and errors. <DT><B>-c</B> <DD> Write decoded images or thumbnails to standard output. <DT><B>-e</B> <DD> Extract the camera-generated thumbnail, not the raw image. You'll get either a JPEG or a PPM file, depending on the camera. <DT><B>-z</B> <DD> 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. <DT><B>-i</B> <DD> Identify files but don't decode them. Exit status is 0 if <B>dcraw</B> can decode the last file, 1 if it can't. <B>-i -v</B> shows metadata. <DT><B></B> <DD> <B>dcraw</B> cannot decode JPEG files!! </DL> <A NAME="lbAF"> </A> <H2>REPAIR OPTIONS</H2> <DL COMPACT> <DT><B>-P deadpixels.txt</B> <DD> Read the dead pixel list from this file instead of ".badpixels". See <B>FILES</B> for a description of the format. <DT><B>-K darkframe.pgm</B> <DD> Subtract a dark frame from the raw data. To generate a dark frame, shoot a raw photo with no light and do <B>dcraw -D -4 -j -t 0</B>. <DT><B>-k darkness</B> <DD> When shadows appear foggy, you need to raise the darkness level. To measure this, apply <B>pamsumm -mean</B> to the dark frame generated above. <DT><B>-S saturation</B> <DD> 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</B> photo.raw <B>| pamsumm -max</B> <DT><B></B> <DD> The default darkness and saturation are usually correct. <DT><B>-n noise_threshold</B> <DD> Use wavelets to erase noise while preserving real detail. The best threshold should be somewhere between 100 and 1000. <DT><B>-C red_mag blue_mag</B> <DD> Enlarge the raw red and blue layers by the given factors, typically 0.999 to 1.001, to correct chromatic aberration. <DT><B>-H 0</B> <DD> Clip all highlights to solid white (default). <DT><B>-H 1</B> <DD> Leave highlights unclipped in various shades of pink. <DT><B>-H 2</B> <DD> Blend clipped and unclipped values together for a gradual fade to white. <DT><B>-H 3+</B> <DD> Reconstruct highlights. Low numbers favor whites; high numbers favor colors. Try <B>-H 5</B> as a compromise. If that's not good enough, do <B>-H 9</B>, cut out the non-white highlights, and paste them into an image generated with <B>-H 3</B>. </DL> <A NAME="lbAG"> </A> <H2>COLOR OPTIONS</H2> By default, <B>dcraw</B> uses a fixed white balance based on a color chart illuminated with a standard D65 lamp. <DL COMPACT> <DT><B>-w</B> <DD> Use the white balance specified by the camera. If this is not found, print a warning and use another method. <DT><B>-a</B> <DD> Calculate the white balance by averaging the entire image. <DT><B>-A left top width height</B> <DD> Calculate the white balance by averaging a rectangular area. First do <B>dcraw -j -t 0</B> and select an area of neutral grey color. <DT><B>-r mul0 mul1 mul2 mul3</B> <DD> Specify your own raw white balance. These multipliers can be cut and pasted from the output of <B>dcraw -v</B>. <DT><B>+M</B> or <B>-M</B> <DD> Use (or don't use) any color matrix from the camera metadata. The default is <B>+M</B> if <B>-w</B> is set, <B>-M</B> otherwise. This option only affects Olympus, Leaf, and Phase One cameras. <DT><B>-o [0-5]</B> <DD> Select the output colorspace when the <B>-p</B> option is not used: <P> <B> 0</B> Raw color (unique to each camera) <BR> <B> 1</B> sRGB D65 (default) <BR> <B> 2</B> Adobe RGB (1998) D65 <BR> <B> 3</B> Wide Gamut RGB D65 <BR> <B> 4</B> Kodak ProPhoto RGB D65 <BR> <B> 5</B> XYZ <DT><B>-p camera.icm</B> [ <B>-o output.icm</B> ] <DD> Use ICC profiles to define the camera's raw colorspace and the desired output colorspace (sRGB by default). <DT><B>-p embed</B> <DD> Use the ICC profile embedded in the raw photo. </DL> <A NAME="lbAH"> </A> <H2>INTERPOLATION OPTIONS</H2> <DL COMPACT> <DT><B>-d</B> <DD> Show the raw data as a grayscale image with no interpolation. Good for photographing black-and-white documents. <DT><B>-D</B> <DD> Same as <B>-d</B>, but totally raw (no color scaling). <DT><B>-h</B> <DD> Output a half-size color image. Twice as fast as <B>-q 0</B>. <DT><B>-q 0</B> <DD> Use high-speed, low-quality bilinear interpolation. <DT><B>-q 1</B> <DD> Use Variable Number of Gradients (VNG) interpolation. <DT><B>-q 2</B> <DD> Use Patterned Pixel Grouping (PPG) interpolation. <DT><B>-q 3</B> <DD> Use Adaptive Homogeneity-Directed (AHD) interpolation. <DT><B>-f</B> <DD> Interpolate RGB as four colors. Use this if the output shows false 2x2 meshes with VNG or mazes with AHD. <DT><B>-m number_of_passes</B> <DD> After interpolation, clean up color artifacts by repeatedly applying a 3x3 median filter to the R-G and B-G channels. </DL> <A NAME="lbAI"> </A> <H2>OUTPUT OPTIONS</H2> By default, <B>dcraw</B> writes PGM/PPM/PAM with 8-bit samples, a BT.709 gamma curve, a histogram-based white level, and no metadata. <DL COMPACT> <DT><B>-W</B> <DD> Use a fixed white level, ignoring the image histogram. <DT><B>-b brightness</B> <DD> Divide the white level by this number, 1.0 by default. <DT><B>-4</B> <DD> Write 16-bit linear samples (fixed white level, no gamma). <DT><B>-T</B> <DD> Write TIFF with metadata instead of PGM/PPM/PAM. <DT><B>-t [0-7,90,180,270]</B> <DD> Flip the output image. By default, <B>dcraw</B> applies the flip specified by the camera. <B>-t 0</B> disables all flipping. <DT><B>-j</B> <DD> 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. <DT><B>-s [0..N-1]</B> or <B>-s all</B> <DD> 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. </DL> <A NAME="lbAJ"> </A> <H2>FILES</H2> <DL COMPACT> <DT>:./.badpixels, ../.badpixels, ../../.badpixels, ...<DD> List of your camera's dead pixels, so that <B>dcraw</B> can interpolate around them. Each line specifies the column, row, and UNIX time of death for one pixel. For example: <P> <PRE> 962 91 1028350000 # died between August 1 and 4, 2002 1285 1067 0 # don't know when this pixel died </PRE> <P> These coordinates are before any cropping or rotation, so use <B>dcraw -j -t 0</B> to locate dead pixels. </DL> <A NAME="lbAK"> </A> <H2>SEE ALSO</H2> <B><A HREF="../man5/pgm.5.html">pgm</A></B>(5), <B><A HREF="../man5/ppm.5.html">ppm</A></B>(5), <B><A HREF="../man5/pam.5.html">pam</A></B>(5), <B><A HREF="../man1/pamsumm.1.html">pamsumm</A></B>(1), <B><A HREF="../man1/pnmgamma.1.html">pnmgamma</A></B>(1), <B><A HREF="../man1/pnmtotiff.1.html">pnmtotiff</A></B>(1), <B><A HREF="../man1/pnmtopng.1.html">pnmtopng</A></B>(1), <B><A HREF="../man1/gphoto2.1.html">gphoto2</A></B>(1), <B><A HREF="../man1/cjpeg.1.html">cjpeg</A></B>(1), <B><A HREF="../man1/djpeg.1.html">djpeg</A></B>(1) <A NAME="lbAL"> </A> <H2>AUTHOR</H2> Written by David Coffin, dcoffin a cybercom o net <P> <HR> <A NAME="index"> </A><H2>Index</H2> <DL> <DT><A HREF="#lbAB">NAME</A><DD> <DT><A HREF="#lbAC">SYNOPSIS</A><DD> <DT><A HREF="#lbAD">DESCRIPTION</A><DD> <DT><A HREF="#lbAE">GENERAL OPTIONS</A><DD> <DT><A HREF="#lbAF">REPAIR OPTIONS</A><DD> <DT><A HREF="#lbAG">COLOR OPTIONS</A><DD> <DT><A HREF="#lbAH">INTERPOLATION OPTIONS</A><DD> <DT><A HREF="#lbAI">OUTPUT OPTIONS</A><DD> <DT><A HREF="#lbAJ">FILES</A><DD> <DT><A HREF="#lbAK">SEE ALSO</A><DD> <DT><A HREF="#lbAL">AUTHOR</A><DD> </DL> <HR> This document was created by <A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>, using the manual pages.<BR> Time: 22:34:13 GMT, September 15, 2008 </BODY> </HTML>