Pangram verdict · v3.3
We believe that this document is fully human-written
AI likelihood · overall
HumanArticle text · 1,755 words · 6 segments analyzed
Back to Dechifro's Home Page
en Esperanto em Português auf Deutsch на русском па-беларуску
Welcome! If you are wondering how to connect your digital camera and download images to a Linux PC, go to the gPhoto homepage. My software is for processing those images after downloading them.
If you're downloading JPEG files, you don't need my software at all. The image has already been processed inside the camera. Almost all digital cameras made since 1997 produce JPEG images, so why would you want to do it any other way?
Well, despite the convenience and ubiquity of JPEG, there are some disadvantages. JPEG is a lossy format -- to fit a big image into a small file, a lot of information is thrown away. That's why midrange and high-end digital cameras offer an alternative: Raw, unprocessed CCD data files, for which the camera manufacturer provides special decoding software.
Of course this software is for Windows and Macintosh only, with no source code. So it's useless to users of other operating systems, programmers hoping to design a better interpolation algorithm, and historians not yet born in an era when the only Windows machines will be in museums.
So here is my mission: Write and maintain an ANSI C program that decodes any raw image from any digital camera on any computer running any operating system.
That program is called dcraw (pronounced "dee-see-raw"), and it's become a standard tool within and without the Open Source world. It's small (about 10,500 lines), portable (standard C libraries only), free (both "gratis" and "libre"), and when used skillfully, produces better quality output than the tools provided by the camera vendor.
I can be reached by sending e-mail to dechifro dot org with the username "dechifro".
News and Interviews
Essay for Digital Outback Photo, 25 April 2003
Article in News.com, 21 April 2005
Interview with Digital Photography Review, 27 April 2005
Dcraw mentioned in Editors Guild magazine, July/August 2005
Interview with Thorsten Schnebeck, 10 June 2006
Interview with Ladinamo, 16 June 2006 My Code Unless otherwise noted in the source code, these programs are free for all uses, although I would like to receive credit for them. Donations are welcome too, if you're making money from my code.
Note to Linux distributors: The only executable files that should be installed by a dcraw package are "dcraw", "clean_crw", and maybe "fuji_green", "fujiturn", and "fujiturn16". My shell scripts are dangerous and should only be installed in a "doc" directory without execute permission.
dcraw.c -- decodes raw photos, extracts thumbnails, and displays metadata Supports 731 cameras at last count. Compile with "gcc -o dcraw -O4 dcraw.c -lm -ljasper -ljpeg -llcms2" or "gcc -o dcraw -O4 dcraw.c -lm -DNODEPS". Run with no arguments to see a usage message. Don't complain that 16-bit output is too dark -- read the FAQ!
UNIX manpage for dcraw This is dcraw's official user documentation, updated in lockstep with the source code.
rawphoto.c -- basic plugin for GIMP 1.2 & 2.0 After installing "dcraw", do "gimptool --install rawphoto.c". My plugin provides a simple dialog box for loading raw files into the Gimp. Udi Fuchs and Joseph Heled have written much nicer plugins, with live preview, histograms, and color curves.
.badpixels -- my camera's "hot pixels" This file tells dcraw which pixels have died and when, so that it can interpolate around them.
dcraw.c,v -- complete unabridged RCS file This file contains the entire history of dcraw.c since its conception on February 23, 1997. If you don't have the RCS toolkit,
download it here.
parse.c -- read image data structures This program displays CIFF and TIFF data structures in a very cryptic format.
clean_crw.c -- clean Canon CRW files Recovered or undeleted CRW files often have junk appended to them that makes them unreadable. This program safely cleans CRW files.
fujiturn.c -- rotate Fuji Super CCD images An alternative to dcraw's built-in Fuji rotation.
fuji_green.c -- convert Fuji green pixels to PGM A side benefit of the Fuji Super CCD design is that its green pixels make nice greyscale images.
For hackers only:
decompress.c is a simple reference decompressor for CRW files. sony_clear.c decrypts SRF files from the Sony DSC-F828.
Internationalization To build and install multilingual dcraw in Linux, download the latest tarball from this directory and run the "install" script. The currently supported languages are Esperanto, Russian, French, Italian, German, Portuguese, Spanish, Dutch, Polish, Hungarian, Czech, Swedish, Catalan, Danish, Romanian, Japanese, and Chinese (both Traditional and Simplified).
To build a unilingual, self-contained DCRAW.EXE for DOS/Windows, use a source file from this directory instead.
To add another language, send me translations of this manpage and this message table in UTF-8 encoding. Translate only from my original English and Esperanto texts -- other languages may contain factual errors invisible to me.
Do not translate "Cannot do X" as "It is impossible to do X". Dcraw is not perfect, so if it cannot do something, that does not mean that the task is impossible. Computers must never use the pronoun "I", so write "dcraw cannot do X".
When in doubt, translate everything. I proofread these texts before releasing them, and it's much easier for me to correct over-translation than under-translation.
Dcraw decodes raw photos, not raw files. No digital camera generates raw files in normal usage, there's always a header with useful metadata. (For abnormal usage, see CHDK and DIAG RAW below)
"raw" is an English word, not an acronym or file format. "raw photo" should be translated with the same adjective that you would use for "crude oil" or "raw materials".
There are dozens of raw photo formats: CRW, CR2, MRW, NEF, RAF, etc. "RAW Format" does not exist; it is an illusion created by dcraw's ability to read all raw formats. Other Raw Photo Decoders Dcraw has made it far easier for developers to support a wide range of digital cameras in their applications. They can call dcraw from a graphical interface, paste pieces of dcraw.c into their code, or just use dcraw.c as the documentation that camera makers refuse to provide:
ACDSee Adobe Photoshop BR's PhotoArchiver by Baard Riiber BreezeBrowser by Chris Breeze Conceiva Lightbox cPicture by Jürgen Eidt Cumulus by Canto dcRAW-X by Bryan Chang DCRawUI by Sune Trudslev DDRoom by Mykhailo Malyshko Directory Opus Plugin by Leo Davidson(with C++ source code) DeepSkyStacker by Luc Coiffier DF Studio by DigitalFusion dpMagic by Mikhail Stolpner GraphicConverter by Thorsten Lemke GTKRawGallery by Daniele Isca GVBox from JCO Consulting HDR Shop ImageLab from Aragon System Imagina by Rob Baker IrfanView by Irfan Skiljan IRIS image processor for astronomers Lightbox by Josh Anon LightZone by LightZone project LRViewer by Marc Rochkind MediaRECOVER File Recovery Software Mixpo by Mixpo Portfolio Broadcasting Inc. Photo Acute by Almalence Photo Companion by Jeff Moore Photo Jockey by Davie Lee Reed who also wrote a
dcraw interface for Delphi programmers.
Photo Organizer by Balint Kis PhotoRescue from DataRescue PhotoReviewer by Ben Haller Photovault by Harri Kaimio Picasa from Google Picture Arena by Felix Schwarz PixInsight by Pleiades Software PolyView by Polybytes PRISM by Alcor System RAW Developer by Iridient Digital Raw Magick RawDrop by Frank Siegert RawTherapee by RT Team Serif PhotoPlus, PanoramaPlus, and AlbumPlus SharpRaw by Duane DeSieno SilverFast DCPro by LaserSoft Imaging StudioLine Photo by H&M Software ViewIt by Zdzislaw Losvik Viewer n5 by Dmitry Fedorov VueScan by Ed Hamrick Xara Xtreme Pro
Frequently Asked Questions
I don't have a C compiler. Could you send me an executable? Sergio Namias has built
some current Windows EXE files here. Dcraw has also been ported to Amiga, MorphOS, BeOS, OS/2, and RISC OS. Why does dcraw say "Out of memory" in Windows Vista? Ostensibly to stop memory leaks, Microsoft decided that programs using the old MS-DOS API, including anything compiled with DJGPP, shall be confined to 32MB of memory. This limitation can be removed by some combination of service packs and registry hacks, or you can compile dcraw to use the newer Win32 API. Thomas Nicely (of Pentium FDIV fame) has a
page describing the problem and various workarounds. How can I read the EXIF data (shutter speed, aperture, etc.)?
Phil Harvey's ExifTool provides a unified Perl-based EXIF reader (and editor!) for all cameras and file formats. "dcraw -i -v" is much faster, but provides less information. How can I read NEF files from Nikon scanners? Dcraw only supports cameras. Try this simple program for scanners. How can I read Nikon Dust Off images (NDF files)? Use this program. Do you have any specifications describing raw photo formats? Yes, but they tend to omit important details, like how to decompress the raw image or decrypt private metadata.
See the TIFF spec, the TIFF/EP spec, the Adobe DNG spec, the CIFF (CRW) spec, and the X3F spec. Where can I get an assortment of raw photos to test my software? For the latest cameras, I get samples from Photography Blog. A "Full Review" at Imaging Resource usually includes a few raw shots. www.rawsamples.ch is no longer updated, but it has samples from older cameras. For $800, I sell a complete test suite on six DVDs containing every camera supported by dcraw, and provide web-based updates for $300/year. I'm designing a digital camera. How do I convert its raw photos into something that dcraw and Adobe Photoshop can open?
Download LibTIFF v3.8.2 and apply this patch. Then use this C program as a template for converting your photos to valid Adobe DNG files. Why are dcraw output images larger than camera JPEGs? Any algorithm that combines each pixel with its neighbors is going to have problems near the edges. C code is cheap, so dcraw applies a different algorithm to edge pixels. Hardware logic is expensive, so cameras crop off the edge pixels after processing. I shot a raw photo with no light. Why does it appear all noisy, when it should be solid black? No matter how dark an image is, dcraw's auto-exposure stretches it so that one percent of its pixels appear white. The "-W" option avoids this behavior. I bracket plus/minus two stops, but all five shots look almost the same in dcraw. Why? See the previous question. Why is 16-bit output dark / unreadable? If you want pretty pictures straight out of dcraw, stay with 8-bit output. 16-bit linear output is the best raw material for professional image editors such as
Photoshop and CinePaint, but it's no good for most image viewers. What does the "-f" (four color RGB) option do? If you see patterns like this or this in your output images, first try "dcraw -a".