Go to content Go to navigation Go to search

Interview with Dave Coffin - Creator of dcraw
2006-06-10 von Thorsten Schnebeck

Dave Coffin (DC) was interviewed by me (e4l) by email. This text is a re-arranged excerpt of the mails. Home of the German translation is ebv4linux.

e4l:
Hello Dave Coffin, every serious user of a DSLR and Linux knows your dcraw but there is not so much information to find about yourself. Can you please introduce yourself.

DC: I live in an apartment in Ballardvale, a village about 35 km north of Boston, Massachusetts. I moved here with two cats in 1999, but they’ve since died. Now I have a wife and a daughter, born in September 2005.




Dave Coffin and his little daughter

e4l: Studying your homepage there is this relation to Esperanto. This sounds very unusual. How did this start?

DC: It started as a mental exercise in 1999, but over the next few years I traveled to Esperanto events in the US, Canada, Brazil, and Europe (twice in Germany).
Likewise my wife started studying it in 2002 in Tyumen, Russia. Her travels spread from there, and our paths crossed in Yalta, Ukraine in May 2003. We married in June 2004 and still speak to each other only in Esperanto.

e4l: How did you come to photography.

DC: My parents bought me a Pentax SLR for my 15th birthday in 1985, and I took about 1500 pictures over the next ten years. But I got tired of having to finish a 38-exposure roll to see my pictures, so I started researching digital cameras.
In February 1997, I bought a 0.5-megapixel Canon PowerShot 600. Canon provided no software for Linux, so I wrote a crude C program to decode the raw photos. That program eventually become dcraw.

e4l: Do you have an example picture that we can publish?

DC: Here’s a photo of Las Vegas from 10000 meters shortly before midnight last December 22. I used my Canon PowerShot G2 on a flight from Los Angeles to Boston.




Las Vegas by Night

e4l: Do you work digital-only or do you have still an affinity to analog cameras?

DC: Well, a simple box camera is useful for taking pictures from an airplane during takeoff and landing, when electronic devices must be turned off.

e4l: When and why did you create dcraw?

DC: I shoot most of my photos as JPEGs, using raw mode only in difficult lighting. So I’m actually not a big user of dcraw…

e4l: This is funny

DC: ... but I am a big fan of free software, and free software isn’t much use if it can’t handle all the weird, undocumented, proprietary file formats that the non-free world throws at us.
Dcraw was something that had to be done. In 2001, when “crw.c” supported only four cameras, I decided to do it.

e4l: How do you start re-engineering a raw format? Did you get any help from manufacturers or software companies?

DC: I don’t even bother asking for help—I just get to work. First I see if the file is uncompressed or has a recognizable format. If not, I install the Windows software on a test platform and start stepping through it in SoftICE.

e4l: Why is your core software completely free and some parts are GPL?

DC: For me, the GPL is a way to earn money selling licenses to commercial software companies without hiding my source code or threatening users.
Having spent months improving support for Foveon cameras (all three of them), I decided to GPL the new code. If I tried that with any other part of dcraw.c, someone else would quickly code up a functionally identical replacement.

e4l: How does this work? Companies pay money for a proprietary use of dcraw, so for relicensing?

DC: Companies want to copy dcraw.c into their code, heavily modify it, and not release their modified source code. Since the GPL does not allow this, they must either cut out the GPL parts or pay me for a license.

e4l: Talking with other developer who want to use your software they are quite unhappy with dcraw that you don’t like to create it as a library. Prominant is the popular GUI “ufraw”. They patch every version of dcraw with lib-stubs and new function headers. There is also a freedesktop project to create a dcraw-lib and in the digiKam project there are still some voices to fork dcraw. So there are some developer that want to help and use dcraw but who need a more flexible developer model. Why not open the dcraw-project to satisfied other developer needs?

DC: Anyone is welcome to fork and libify dcraw, but my focus is on new raw formats and new features. I support one interface, and even that needs to change from time to time, as it did with the recently added highlight recovery (-H).
Libraries work well for closed problems, like math functions or JPEG support. But when your problem is a moving target, today’s “flexible developer model” is tomorrow’s “deprecated legacy class”.
Every developer I’ve talked to wants to abstract dcraw.c in a different way. One wants raw data only, one wants interpolation
without color balance, and so on. Trying to please them all would
end up pleasing no one.

e4l: Are you the “lonely coder” type or do you prefer to code in teams? Are there other code contributers than you?

DC: Definitely the “lonely coder” type. Although some parts were first written by others (AHD by Paul Lee, SMaL decoding by Rich Taylor), I recreated their algorithms in my own coding style.

e4l: When there would be a libify dcraw fork can you still think of a form of collaboration to keep both versions in sync?

DC: I’m open to putting a few unobtrusive hooks in dcraw.c to make integration easier. For example, each function declaration contains the null macro “CLASS”. If you wrap the global vars in “class DCRaw { }” and define CLASS as “DCRaw::”, you’ll have a C++ class.

e4l: Can you tell us more about the near future of dcraw? Are there new demosaicing techniques or metatags that will have an impact on decoding process? With this mega pixel mania files get bigger and bigger. Any change to speed-up some routines?

DC: As I see chances to improve dcraw, I take them. Right now, there’s nothing big in the pipeline, just better camera white balance and more new cameras. So far, the increase in megahertz available to run dcraw has compensated nicely for the increase in megapixels.

e4l: What software do you use yourself to edit and manage your photos?

DC: I still use John Bradley’s XV, which hasn’t had a real update since 1994. Its editing is weak, but for displaying images, it’s a hacker’s dream come true.

e4l: What kind of function do you still miss in free software?

DC: In voice recognition and OCR, free software is far behind commercial products, although some of the latter can probably be run in WINE. And Quicktime keeps changing codecs to stay ahead of MPlayer.

e4l: I mean more in the area of photography. Have you never tried a specialist photo-software like ufraw or digiKam?

DC: I just tried them. The latest UFRaw is very nice, but digiKam impressed me as more of a toy.
For a really nice tool, try “jpegtran -copy all”. I tested it very carefully on my camera JPEGs to make sure it could rotate them back and forth without data loss. Then I batch-rotated thousands of images and deleted the originals. Slideshows are much nicer when every photo is correctly oriented.
ExifTool can do the same for raw photos, although I prefer to change the orientation byte by hand.

e4l: You are also a prominent supporter of the openraw initiative. Do you think such a user driven approach can be successful? Openraw seems to be more about lobbying to open vendor format specs but not about creating specs. OTOH Adobe tries to establish DNG. Can you give some comments about Adobes DNG format, as you created a patch for libtiff to generate DNG compatible TIFF files.

DC: The big camera makers (Canon, Nikon, etc.) do not care what Adobe or the OpenRaw people think, say, or do. Any initiative that depends on them caring will fail.
Adobe DNG is great for small camera makers who don’t want the hassle of creating their own raw format and writing software to support it. And it’s great for dcraw, because now I can do real color management with Adobe’s matrices instead of my crude color manipulations prior to dcraw v7.00.

e4l: Ok, then do I hope, that you still like to hack raw formats in the future and that that legal and patent-stuff does not create too much problems. Its great to have you and your software in the Linux photo community.

Thanks for the interview and

Have Fun :-)

Thorsten Schnebeck for ebv4linux