http://www.cybercom.net/~dcoffin/dcraw/:

   [1]Back to Dave Coffin's Home Page

   Not affiliated with [2]Canon, [3]Nikon, [4]Kodak, or any other company
                               named herein. 

   Welcome! If you are wondering how to connect your digital camera and
   download images to a Linux PC, go to the [5]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 [6]dcraw.c, and it's become a standard tool
   within and without the Open Source world. It's small (about 6000
   lines), portable (standard C libraries only), free (both "gratis" and
   "libre"), and when used skillfully, produces [7]better quality
   [8]output than the tools provided by the camera vendor.

   [9]Here's my resume. I do freelance consulting related to dcraw, and
   I'm also available for full-time work in BIOS engineering or UNIX
   system administration.

   I can be reached by sending e-mail to cybercom dot net with the
   username "dcoffin".

  My Code

   There are no restrictions on this code, although I would like to
   receive credit for it. Donations are welcome, especially if you're
   using my code commercially.

   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.
     * [10]dcraw.c -- decodes raw photos, extracts thumbnails, and
       displays metadata
       Supports 205 cameras at last count. Compile with "gcc -o dcraw -O4
       dcraw.c -lm -ljpeg -llcms" or "gcc -o dcraw -O4 dcraw.c -lm
       -DNO_JPEG -DNO_LCMS". Run with no arguments to see a usage
       message. Don't complain that 16-bit output is too dark -- read the
       FAQ!
     * [11]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. [12]Pawel Jochym , [13]Udi Fuchs , and [14]Joseph Heled have
       written much nicer plugins, with live preview, histograms, and
       color curves.
     * [15].badpixels -- my camera's "hot pixels"
       This file tells dcraw which pixels have died and when, so that it
       can interpolate around them.
     * [16]dcraw.1 -- UNIX manpage for dcraw
       Contains details and helpful hints not found elsewhere.
     * [17]dcwrap -- example wrapper script
       This is what I use with my PowerShot G2.
     * [18]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, [19]download it here.
     * [20]parse.c -- read image data structures
       This program displays CIFF and TIFF data structures in a very
       cryptic format.
     * [21]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.
     * [22]fixdates.c -- set time on Canon CRW files
       This program has been superseded by "dcraw -z".
     * [23]fujiturn.c -- rotate Fuji Super CCD images
       An alternative to dcraw's built-in Fuji rotation.
     * [24]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 black-and-white images.

   For hackers only:
     * [25]decompress.c is a simple reference decompressor for CRW files.
     * [26]pgm.c converts the decompressed data into an 8-bit grayscale
       image.
     * [27]sony_clear.c decrypts SRF files from the Sony DSC-F828.

  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:
     * [28]ACDSee
     * [29]Adobe Photoshop
     * [30]BR's PhotoArchiver by Baard Riiber
     * [31]BreezeBrowser by Chris Breeze
     * [32]Conceiva Lightbox
     * [33]cPicture by Jrgen Eidt
     * [34]Cumulus by Canto
     * [35]dcRAW-X by Bryan Chang
     * [36]DCRawUI by Sune Trudslev
     * [37]Directory Opus Plugin by Leo Davidson(with C++ source code)
     * [38]dpMagic by Mikhail Stolpner
     * [39]EasyRaw Studio
     * [40]GraphicConverter by Thorsten Lemke
     * [41]GVBox from JCO Consulting
     * [42]IrfanView by Irfan Skiljan
     * [43]IRIS image processor for astronomers
     * [44]KA Photoservice
     * [45]Lightbox by Josh Anon
     * [46]LightZone by Anton Kast
     * [47]Photo Companion by Jeff Moore
     * [48]Photo Jockey by Davie Lee Reed who also wrote a [49]dcraw
       interface for Delphi programmers.
     * [50]Photo Organizer by Balint Kis
     * [51]PhotoReviewer by Ben Haller
     * [52]Picasa from Google
     * [53]Picture Arena by Felix Schwarz
     * [54]PiXPO by How2Share Technologies
     * [55]PolyView by Polybytes
     * [56]PowerShovel-II by Luc Minnebo
     * [57]RAW Developer by Iridient Digital
     * [58]Raw Magick
     * [59]RawConvert by Jason Swain
     * [60]RawDrop by Frank Siegert
     * [61]RawShooter from pixmantec
     * [62]RawView by Jari Savolainen
     * [63]Serif PhotoPlus, PanoramaPlus, and AlbumPlus
     * [64]SharpRaw by Duane DeSieno
     * [65]SilverFast DCPro by LaserSoft Imaging
     * [66]StudioLine Photo by H&M Software
     * [67]ViewIt by Zdzislaw Losvik
     * [68]Viewer n5 by Dmitry Fedorov
     * [69]VueScan by Ed Hamrick

  Frequently Asked Questions

   I don't have a C compiler. Could you send me an executable?
          No, but Francisco Montilla provides Mac OS and Windows
          executables [70]on his website. And Benjamin Lebsanft has
          volunteered to maintain [71]Windows executables optimized for
          specific CPUs.

          If you're familiar with the DOS command line but don't know C,
          you can install this [72]free C compiler for Windows and
          compile dcraw.c quite easily.

   How can I read the EXIF data (shutter speed, aperture, etc.)?
          [73]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 [74]this simple program for
          scanners.

   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
          [75]TIFF spec, the [76]TIFF/EP spec, the [77]Adobe DNG spec,
          the [78]CIFF (CRW) spec, and the [79]X3F spec.

   I'm designing a digital camera. How do I convert its raw photos into
          something that dcraw and Adobe Photoshop can open?
          Download [80]LibTIFF v3.8.0 and apply [81]this patch. Then use
          [82]this C program as a template for converting your photos to
          valid [83]Adobe DNG files.

   Why is 16-bit output dark / flattened / 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 [84]Photoshop and
          [85]CinePaint, but it's no good for most image viewers.

   Could you please add an option for TIFF / FITS / PNG / BMP / JPEG
          output?
          No. Dcraw writes PPM only. To convert to other formats:

dcraw -c crw_0001.crw | pnmtotiff -truecolor > crw_0001.tiff
dcraw -c crw_0001.crw | pnmtofits > crw_0001.fits
dcraw -c crw_0001.crw | pnmtopng > crw_0001.png
dcraw -c crw_0001.crw | ppmtobmp > crw_0001.bmp
dcraw -c crw_0001.crw | cjpeg > crw_0001.jpeg

          I used the [86]Netpbm toolkit in these examples.
          [87]ImageMagick also does command-line format conversions. Both
          are free.

   Why don't you implement dcraw as a library?
          I have decided that dcraw shall be a command-line program
          written in C, and that any further abstraction layers must be
          added around this core, not inside it.

          Library code is ugly because it cannot use global variables.
          Libraries are more difficult to modify, build, install, and
          test than standalone programs, and so are inappropriate for
          file formats that change every day.

          There's a simpler way to make dcraw modular and thread-safe:
          Run it as a separate process. Eric Raymond [88]explains this
          technique here.

   What does the "-f" option do? What's "four-color RGB"?
          If you see [89]patterns like this in your output images, use
          the "-f" option. Otherwise, don't.

   Why are there false colors along edges within the image?
          Because of interpolation. This is a hard problem, easily
          defined:

         1. Take a three-color RGB image. At each pixel, set two color
            values to zero.
         2. Reconstruct the original three-color image as best you can
            from the remaining one color per pixel.

          Dcraw currently gives a choice of three methods: Bilinear,
          Variable Number of Gradients (VNG), and Adaptive
          Homogeneity-Directed (AHD).

          [90]The Foveon X3 Capture chip requires a different kind of
          interpolation. Unlike CCD arrays, it captures three colors at
          every pixel location. But the colors are not well separated, so
          the raw data looks very gray. Much processing is needed to
          enhance color while suppressing noise.

   How do I get my camera to take raw photos?
          For some Nikon Coolpix cameras, you need to enable a
          [91]special "DIAG RAW" mode.
          For Casio cameras, see [92]Maurice Delaney's website or read
          [93]this discussion on dpreview.
          For the Minolta DiMAGE G400, G500, or G600, go [94]here (in
          Russian) or [95]here (in English).
          For the Minolta DiMAGE Z2 and Nikon Coolpix 2100/3100/3700,
          [96]go here.
          For SMaL cameras, see the [97]camerahacking Forum.

          For other cameras, refer to the User's Manual.

   Does dcraw work with my camera?
          Most likely, yes. The cameras listed below are supported. If
          your camera is not on the list, try dcraw anyway. If it doesn't
          work, post a raw image to a website and e-mail me the URL. If
          you don't have a website, use [98]Dropload or [99]YouSendIt.

          Ideally, your sample image should show a standard white card or
          color chart in direct sunlight, with other colors in the
          background.

          + Adobe Digital Negative (DNG)
          + AVT F-145C
          + AVT F-201C
          + AVT F-510C
          + AVT F-810C
          + Canon PowerShot 600
          + Canon PowerShot A5
          + Canon PowerShot A5 Zoom
          + Canon PowerShot A50
          + Canon PowerShot Pro70
          + Canon PowerShot Pro90 IS
          + Canon PowerShot G1
          + Canon PowerShot G2
          + Canon PowerShot G3
          + Canon PowerShot G5
          + Canon PowerShot G6
          + Canon PowerShot S30
          + Canon PowerShot S40
          + Canon PowerShot S45
          + Canon PowerShot S50
          + Canon PowerShot S60
          + Canon PowerShot S70
          + Canon PowerShot Pro1
          + Canon EOS D30
          + Canon EOS D60
          + Canon EOS 5D
          + Canon EOS 10D
          + Canon EOS 20D
          + Canon EOS 30D
          + Canon EOS 300D
          + Canon EOS 350D
          + Canon EOS Digital Rebel
          + Canon EOS Digital Rebel XT
          + Canon EOS Kiss Digital
          + Canon EOS D2000C
          + Canon EOS-1D
          + Canon EOS-1DS
          + Canon EOS-1D Mark II
          + Canon EOS-1D Mark II N
          + Canon EOS-1Ds Mark II
          + Casio QV-2000UX
          + Casio QV-3000EX
          + Casio QV-3500EX
          + Casio QV-4000
          + Casio QV-5700
          + Casio QV-R51
          + Casio QV-R61
          + Casio EX-S100
          + Casio EX-Z50
          + Casio EX-Z55
          + Casio Exlim Pro 505
          + Casio Exlim Pro 600
          + Casio Exlim Pro 700
          + Contax N Digital
          + Creative PC-CAM 600
          + Epson R-D1
          + Foculus 531C
          + Fuji FinePix E550
          + Fuji FinePix E900
          + Fuji FinePix F700
          + Fuji FinePix F710
          + Fuji FinePix F800
          + Fuji FinePix F810
          + Fuji FinePix S2Pro
          + Fuji FinePix S3Pro
          + Fuji FinePix S20Pro
          + Fuji FinePix S5000
          + Fuji FinePix S5100/S5500
          + Fuji FinePix S5200/S5600
          + Fuji FinePix S7000
          + Fuji FinePix S9000/S9500
          + Imacon Ixpress 16-megapixel
          + Imacon Ixpress 22-megapixel
          + ISG 2020x1520
          + Kodak DC20 (see [100]Oliver Hartman's page)
          + Kodak DC25 (see [101]Jun-ichiro Itoh's page)
          + Kodak DC40
          + Kodak DC50
          + Kodak DC120 (also try [102]kdc2tiff)
          + Kodak DCS315C
          + Kodak DCS330C
          + Kodak DCS420
          + Kodak DCS460
          + Kodak DCS460A
          + Kodak DCS520C
          + Kodak DCS560C
          + Kodak DCS620C
          + Kodak DCS620X
          + Kodak DCS660C
          + Kodak DCS660M
          + Kodak DCS720X
          + Kodak DCS760C
          + Kodak DCS760M
          + Kodak EOSDCS1
          + Kodak EOSDCS3B
          + Kodak NC2000F
          + Kodak ProBack
          + Kodak PB645C
          + Kodak PB645H
          + Kodak PB645M
          + Kodak DCS Pro 14n
          + Kodak DCS Pro 14nx
          + Kodak DCS Pro SLR/c
          + Kodak DCS Pro SLR/n
          + Kodak P850
          + Kodak P880
          + Kodak KAI-0340
          + Konica KD-400Z
          + Konica KD-510Z
          + Leaf Aptus 17
          + Leaf Valeo 11
          + Leaf Valeo 22
          + Leaf Volare
          + Leica Digilux 2
          + Logitech Fotoman Pixtura
          + Minolta RD175
          + Minolta DiMAGE 5
          + Minolta DiMAGE 7
          + Minolta DiMAGE 7i
          + Minolta DiMAGE 7Hi
          + Minolta DiMAGE A1
          + Minolta DiMAGE A2
          + Minolta DiMAGE A200
          + Minolta DiMAGE G400
          + Minolta DiMAGE G500
          + Minolta DiMAGE G600
          + Minolta DiMAGE Z2
          + Minolta Alpha/Dynax/Maxxum 5D
          + Minolta Alpha/Dynax/Maxxum 7D
          + Nikon D1
          + Nikon D1H
          + Nikon D1X
          + Nikon D100
          + Nikon D2H
          + Nikon D2Hs
          + Nikon D2X
          + Nikon D200
          + Nikon D50
          + Nikon D70
          + Nikon D70s
          + Nikon E700 ("DIAG RAW" hack)
          + Nikon E800 ("DIAG RAW" hack)
          + Nikon E880 ("DIAG RAW" hack)
          + Nikon E900 ("DIAG RAW" hack)
          + Nikon E950 ("DIAG RAW" hack)
          + Nikon E990 ("DIAG RAW" hack)
          + Nikon E995 ("DIAG RAW" hack)
          + Nikon E2100 ("DIAG RAW" hack)
          + Nikon E2500 ("DIAG RAW" hack)
          + Nikon E3700 ("DIAG RAW" hack)
          + Nikon E4300 ("DIAG RAW" hack)
          + Nikon E4500 ("DIAG RAW" hack)
          + Nikon E5000
          + Nikon E5400
          + Nikon E5700
          + Nikon E8400
          + Nikon E8700
          + Nikon E8800
          + Olympus C3030Z
          + Olympus C5050Z
          + Olympus C5060WZ
          + Olympus C7070WZ
          + Olympus C70Z,C7000Z
          + Olympus C740UZ
          + Olympus C770UZ
          + Olympus C8080WZ
          + Olympus E-1
          + Olympus E-10
          + Olympus E-20
          + Olympus E-300
          + Olympus E-330
          + Olympus E-500
          + Olympus SP500UZ
          + Panasonic DMC-FZ30
          + Panasonic DMC-LC1
          + Panasonic DMC-LX1
          + Pentax *ist D
          + Pentax *ist DL
          + Pentax *ist DS
          + Pentax Optio S
          + Pentax Optio S4
          + Pentax Optio 33WR
          + Phase One LightPhase
          + Phase One H 10
          + Phase One H 20
          + Phase One H 25
          + Phase One P 20
          + Phase One P 25
          + Phase One P 30
          + Phase One P 45
          + Pixelink A782
          + Polaroid x530
          + Rollei d530flex
          + RoverShot 3320af
          + Sarnoff 4096x5440
          + Sigma SD9
          + Sigma SD10
          + Sinar 3072x2048
          + Sinar STI format
          + SMaL Ultra-Pocket 3
          + SMaL Ultra-Pocket 4
          + SMaL Ultra-Pocket 5
          + Sony DSC-F828
          + Sony DSC-R1
          + Sony DSC-V3
          + STV680 VGA
     _________________________________________________________________

References

   1. http://www.cybercom.net/~dcoffin/
   2. http://www.canon.com/
   3. http://www.nikon.com/
   4. http://www.kodak.com/
   5. http://gphoto.sourceforge.net/
   6. http://www.cybercom.net/~dcoffin/dcraw/dcraw.c
   7. http://www.insflug.org/raw/
   8. http://www.aim-dtp.net/aim/digicam/dcraw/
   9. http://www.cybercom.net/~dcoffin/resume.html
  10. http://www.cybercom.net/~dcoffin/dcraw/dcraw.c
  11. http://www.cybercom.net/~dcoffin/dcraw/rawphoto.c
  12. http://ptj.rozeta.com.pl/Soft/RawPhoto/
  13. http://ufraw.sourceforge.net/
  14. http://pages.quicksilver.net.nz/pepe/
  15. http://www.cybercom.net/~dcoffin/dcraw/.badpixels
  16. http://www.cybercom.net/~dcoffin/dcraw/dcraw.1
  17. http://www.cybercom.net/~dcoffin/dcraw/dcwrap
  18. http://www.cybercom.net/~dcoffin/dcraw/RCS/dcraw.c,v
  19. http://www.cs.purdue.edu/homes/trinkle/RCS/
  20. http://www.cybercom.net/~dcoffin/dcraw/parse.c
  21. http://www.cybercom.net/~dcoffin/dcraw/clean_crw.c
  22. http://www.cybercom.net/~dcoffin/dcraw/fixdates.c
  23. http://www.cybercom.net/~dcoffin/dcraw/fujiturn.c
  24. http://www.cybercom.net/~dcoffin/dcraw/fuji_green.c
  25. http://www.cybercom.net/~dcoffin/dcraw/decompress.c
  26. http://www.cybercom.net/~dcoffin/dcraw/pgm.c
  27. http://www.cybercom.net/~dcoffin/dcraw/sony_clear.c
  28. http://www.acdsystems.com/
  29. http://www.adobe.com/products/photoshop/cameraraw.html
  30. http://www.br-software.com/
  31. http://www.breezesys.com/
  32. http://www.conceiva.com/
  33. http://cpicture.net/en/t_raw.html
  34. http://www.canto.com/
  35. http://frostyplace.com/dcraw/
  36. http://www.tanis.dk/wiki/index.php/DCRawUI
  37. http://www.pretentiousname.com/jp2raw/
  38. http://www.dpmagic.com/
  39. http://www.easyraw.com/
  40. http://www.lemkesoft.com/
  41. http://jcoconsulting.com/index.asp?Section=GVOCX
  42. http://www.irfanview.com/
  43. http://www.astrosurf.com/buil/us/iris/iris.htm
  44. http://www.kaorg.com/photoservice.asp
  45. http://www.lightboxsoftware.com/
  46. http://sonic.net/~rat/lightcrafts/
  47. http://www.wildcape.com/
  48. http://photojockey.com/
  49. http://smatters.com/dcraw/
  50. http://www.k-i-s.net/
  51. http://www.sticksoftware.com/software/PhotoReviewer.html
  52. http://www.picasa.com/
  53. http://www.picturearena.com/
  54. http://www.pixpo.com/
  55. http://www.polybytes.com/
  56. http://lens.liteserv.com/download/powershovel2.php
  57. http://www.iridientdigital.com/
  58. http://www.rawmagick.com/
  59. http://www.i-graph.com/
  60. http://www.wizards.de/rawdrop
  61. http://www.pixmantec.com/
  62. http://www.through-the-lens.net/
  63. http://www.serif.com/
  64. http://www.logicaldesigns.com/
  65. http://www.silverfast.com/
  66. http://www.studioline.net/
  67. http://www.hexcat.com/viewit/
  68. http://www.dimin.net/software/viewer/
  69. http://www.hamrick.com/
  70. http://www.insflug.org/raw/
  71. http://www.lebsanft.org/blog/index.php?cat=9
  72. http://www.delorie.com/djgpp/
  73. http://www.sno.phy.queensu.ca/~phil/exiftool/
  74. http://www.cybercom.net/~dcoffin/dcraw/scan.c
  75. http://partners.adobe.com/asn/developer/PDFS/TN/TIFF6.pdf
  76. http://www.map.tu.chiba-u.ac.jp/IEC/100/TA2/recdoc/N4378.pdf
  77. http://www.adobe.com/products/dng/pdfs/dng_spec.pdf
  78. http://xyrion.org/ciff/
  79. http://www.x3f.info/technotes/FileDocs/X3F_Format.pdf
  80. http://dl.maptools.org/dl/libtiff/tiff-3.8.0.tar.gz
  81. http://www.cybercom.net/~dcoffin/dcraw/libtiff.patch
  82. http://www.cybercom.net/~dcoffin/dcraw/elphel_dng.c
  83. http://www.adobe.com/products/dng/main.html
  84. http://www.adobe.com/products/photoshop/main.html
  85. http://cinepaint.sourceforge.net/
  86. http://netpbm.sourceforge.net/
  87. http://www.imagemagick.org/
  88. http://www.faqs.org/docs/artu/multiprogramchapter.html
  89. http://www.cybercom.net/~dcoffin/dcraw/screendoor.png
  90. http://www.dpreview.com/news/0202/02021101foveonx3.asp
  91. http://e2500.narod.ru/raw_format_e.htm
  92. http://www.inweb.ch/foto/rawformat.html
  93. http://forums.dpreview.com/forums/read.asp?forum=1015&message=4961779
  94. http://myfototest.narod.ru/
  95. http://forums.dpreview.com/forums/read.asp?forum=1024&message=11773287
  96. http://tester13.nm.ru/nikon/
  97. http://www.camerahacking.com/
  98. http://dropload.com/
  99. http://yousendit.com/
 100. http://www.planet-interkom.de/oliver.hartmann/dc20secr.htm
 101. http://www.itojun.org/diary/19961113/index.eng.html
 102. http://kdc2tiff.sourceforge.net/
