dcraw(1)
๐ dcraw โ the raw photo decoder that ATE ๐
okay so this is the manpage for dcraw(1) from the General Commands Manual, and bestie, she's an icon. lowkey old-school, highkey still slaying. let's get into it ๐ซถ
โจ NAME โจ
dcraw โ command-line decoder for raw digital photos
โจ SYNOPSIS โจ
dcraw [OPTION]... [FILE]...
โจ DESCRIPTION โจ
so like. dcraw decodes raw photos, displays metadata, and extracts thumbnails. that's the whole vibe. three jobs, all of them iconic. ๐
โจ GENERAL OPTIONS โจ
the basics, the starter pack, the "learn this first" era:
-vโ print verbose messages, not just warnings and errors. she's chatty, she's telling you everything, we love a transparent queen ๐-cโ write decoded images or thumbnails to standard output.-eโ extract the camera-generated thumbnail, not the raw image. you'll get either a JPEG or a PPM file, depending on the camera. surprises! ๐-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. time travel, but make it filesystem metadata โจ-iโ identify files but don't decode them. exit status is0ifdcrawcan decode the last file,1if it can't. and-i -vshows metadata.
no cap, dcraw cannot decode JPEG files!! ๐ญ it's giving "wrong tool for the job" and we need you to know that fr fr.
โจ REPAIR OPTIONS โจ
the damage-control section. fixing things, patching things, healing her ๐
-Iโ read the raw pixels from standard input in CPU byte order with no header. usedcraw -E -4to get the raw pixel values.-P deadpixels.txtโ read the dead pixel list from this file instead of".badpixels". see FILES for a description of the format.-K darkframe.pgmโ subtract a dark frame from the raw data. to generate a dark frame, shoot a raw photo with no light and dodcraw -D -4 -j -t 0.-k darknessโ when shadows appear foggy, you need to raise the darkness level. to measure this, applypamsumm -meanto the dark frame generated above.-S saturationโ when highlights appear pink, you need to lower the saturation level. to measure this, take a picture of something shiny and dodcraw -D -4 -j -c photo.raw | pamsumm -max
๐ก the default darkness and saturation are usually correct. like, don't touch what's already eating. ๐
-n noise_thresholdโ use wavelets to erase noise while preserving real detail. the best threshold should be somewhere between100and1000.-C red_mag blue_magโ enlarge the raw red and blue layers by the given factors, typically0.999to1.001, to correct chromatic aberration.-H 0โ clip all highlights to solid white (default).-H 1โ leave highlights unclipped in various shades of pink.-H 2โ blend clipped and unclipped values together for a gradual fade to white.-H 3+โ reconstruct highlights. low numbers favor whites; high numbers favor colors. try-H 5as a compromise. if that's not good enough, do-H 9, cut out the non-white highlights, and paste them into an image generated with-H 3.
๐ COLOR OPTIONS ๐
by default, dcraw uses a fixed white balance based on a color chart illuminated with a standard D65 lamp. that's the baseline, the default aesthetic, the starting fit ๐
-wโ use the white balance specified by the camera. if this is not found, print a warning and use another method. she'll improvise ๐-aโ calculate the white balance by averaging the entire image.-A left top width heightโ calculate the white balance by averaging a rectangular area. first dodcraw -j -t 0and select an area of neutral grey color.-r mul0 mul1 mul2 mul3โ specify your own raw white balance. these multipliers can be cut and pasted from the output ofdcraw -v.+Mor-Mโ use (or don't use) any color matrix from the camera metadata. the default is+Mif-wis set or the photo is in DNG format,-Motherwise. besides DNG, this option only affects Olympus, Leaf, and Phase One cameras.-o [0-6]โ select the output colorspace when the-poption is not used:0โ Raw color (unique to each camera)1โ sRGB D65 (default)2โ Adobe RGB (1998) D653โ Wide Gamut RGB D654โ Kodak ProPhoto RGB D655โ XYZ6โ ACES
-p camera.icm [ -o output.icm ]โ use ICC profiles to define the camera's raw colorspace and the desired output colorspace (sRGB by default).-p embedโ use the ICC profile embedded in the raw photo. she comes with her own lore ๐
๐ฆ INTERPOLATION OPTIONS ๐ฆ
where the pixels get their whole personality assigned:
-dโ show the raw data as a grayscale image with no interpolation. good for photographing black-and-white documents.-Dโ same as-d, but with the original unscaled pixel values.-Eโ same as-D, but masked pixels are not cropped.-hโ output a half-size color image. twice as fast as-q 0. speed demon energy ๐ฅ-q 0โ use high-speed, low-quality bilinear interpolation.-q 1โ use Variable Number of Gradients (VNG) interpolation.-q 2โ use Patterned Pixel Grouping (PPG) interpolation.-q 3โ use Adaptive Homogeneity-Directed (AHD) interpolation.-fโ interpolate RGB as four colors. use this if the output shows false 2x2 meshes with VNG or mazes with AHD.-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.
๐ธ OUTPUT OPTIONS ๐ธ
by default, dcraw writes PGM/PPM/PAM with 8-bit samples, a BT.709 gamma curve, a histogram-based white level, and no metadata. that's the factory setting, bestie โจ
-Wโ use a fixed white level, ignoring the image histogram.-b brightnessโ divide the white level by this number,1.0by default.-g power toe_slopeโ set the gamma curve, by default BT.709 (-g 2.222 4.5). if you prefer sRGB gamma, use-g 2.4 12.92. for a simple power curve, set the toe slope to zero.-6โ write sixteen bits per sample instead of eight.-4โ linear 16-bit, same as-6 -W -g 1 1.-Tโ write TIFF with metadata instead of PGM/PPM/PAM.-t [0-7,90,180,270]โ flip the output image. by default,dcrawapplies the flip specified by the camera.-t 0disables all flipping.-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.-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.
๐ FILES ๐
./.badpixels,../.badpixels,../../.badpixels, ... โ list of your camera's dead pixels, so thatdcrawcan interpolate around them. each line specifies the column, row, and UNIX time of death for one pixel. for example:
962 91 1028350000 # died between August 1 and 4, 2002
1285 1067 0 # don't know when this pixel died
these coordinates are before any stretching or rotation, so use dcraw -j -t 0 to locate dead pixels. rip to those pixels, they served their time ๐ฏ๏ธ
๐ SEE ALSO ๐
pgm(5), ppm(5), pam(5), pamsumm(1), pnmgamma(1), pnmtotiff(1), pnmtopng(1), gphoto2(1), cjpeg(1), djpeg(1)
๐ AUTHOR ๐
written by David Coffin, dcoffin a cybercom o net
and that's the whole page, bestie!! ๐ซถ this edition of dcraw(1) is dated March 3, 2015 โ yes she's a vintage queen and yes she still understood the assignment. go decode something gorgeous. mwah ๐โจ
๐ฆ where this page comes from
- arch rolling: dcraw 9.28.0-5 ยท custom
- centos-stream 10: dcraw 9.28.0-25.el10 ยท GPL-2.0-or-later
- centos-stream 9: dcraw 9.28.0-13.el9 ยท GPLv2+
- fedora 43: dcraw 9.28.0-26.fc43 ยท GPL-2.0-or-later
- fedora 44: dcraw 9.28.0-28.fc44 ยท GPL-2.0-or-later
- opensuse-leap 16.0: dcraw 9.28.0-160000.2.2 ยท GPL-2.0-or-later
- opensuse-leap 16.0: dcraw 9.28.0-160000.2.2 ยท GPL-2.0-or-later
- opensuse-leap 16.0: dcraw 9.28.0-160000.2.2 ยท GPL-2.0-or-later
- opensuse-leap 16.0: dcraw 9.28.0-160000.2.2 ยท GPL-2.0-or-later
- Copyright (c) 2015 by David Coffin
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms