This site is supported by the advertisements on it, please disable your AdBlocker so we can continue to provide you with the quality content you expect.

Dave Coffin's dcraw output

Discussion in 'X-Pro1 and X-Pro2' started by AusPhotoHiker, Apr 24, 2012.

  1. AusPhotoHiker

    AusPhotoHiker Premium Member

    Messages:
    1,116
    Likes Received:
    158
    Location:
    Australia

    -Return to Top-

    A while ago I mentioned that Dave had updated his test version of dcraw to include a few new cameras. I had forgotten about this as my camera turned up, but prompted by the ongoing discussion regarding the slowness of raw support from the majors, I went through the hassle of building it on my Mac using MacPorts and tried it out.

    To extract a Tiff file from a .RAF and use the camera-decided white balance, I used this command:

    Code:
    dcraw -w -T DSCF0535.RAF
    This resulted in a new .tiff file appearing beside the RawFile. Sizes:

    Code:
    -rwxrwxrwx  1 michael  michael  26146368 23 Apr 10:03 DSCF0535.RAF
    -rw-r--r--  1 michael  michael  48847904 24 Apr 12:31 DSCF0535.tiff
    First, the original camera jpeg after minor levels adjustment in LR: (Provia Standard)

    [​IMG]

    And the dcraw version after quick adjustment in LR:

    [​IMG]

    I haven't tried to match the colours at all, and there is just standard LR sharpening applied to both images on export.
     
  2. tdp

    tdp New Member

    Messages:
    24
    Likes Received:
    0

    -Return to Top-

    Oh this rocks the casbah
     
  3. jknights

    jknights Moderator Staff Member

    Messages:
    9,188
    Likes Received:
    1,215
    Location:
    Oliva, Valencia, Spain

    -Return to Top-

    Not too difficult to use Automator or write some scripts and I am running in high octane mode!

    Thanks Mike. Definitely owe you a beer.

    Looks like autumn is there in OZ. Rain in Adelaide, must be!.
     
  4. DrRoot

    DrRoot New Member

    Messages:
    4
    Likes Received:
    1

    -Return to Top-

    Hi Mike,

    where do I find the latest test version of dcraw? On Dave Coffin's dcraw page there is only a version that ends in 2011.

    Cheers, Fons.
     
  5. jknights

    jknights Moderator Staff Member

    Messages:
    9,188
    Likes Received:
    1,215
    Location:
    Oliva, Valencia, Spain

    -Return to Top-

    Was going to ask the same question myself as I just checked that I have got all the stuff.
    Where is the beta download located ?
    Do you have app/dmg ?
    Is it possible to send the compile project for the code (dcraw) ?

    If you zip then you can send to me using YouSendIt.com (my email address is visible in my profile) or I can FTP it off from somewhere.
     
  6. AusPhotoHiker

    AusPhotoHiker Premium Member

    Messages:
    1,116
    Likes Received:
    158
    Location:
    Australia

    -Return to Top-

    Ok, we have the compiled Mac executable file and the test source code file.

    Download from jknights site here: http://www.jmknights.com/transfer/Dcraw.zip

    Be aware: This is a commandline tool, not a graphical program. There is no installer. It may not work on your computer, you may not have enough knowledge to use or compile it. This is a tool usually used from the terminal program as described above in the first post.

    Included is a Mac executable, it will not work in linux or Windows - you will need to compile your own version from dcraw.c for those systems. Depending on your Mac, it may not work in that either.

    If you have a Mac, copy the file dcraw from the zipfile to /usr/local/bin

    If you have a linux box compile the file dcraw.c as you would normally.

    If you have a windows box, you will need to compile the dcraw.c too. I have no idea how you should do that (sorry), but getting a C build environment would be the first thing to do. If you don't know what that means I cannot help you.

    You may find help at Dave's site: http://www.cybercom.net/~dcoffin/dcraw/

    Like all free software, if this breaks, breaks your computer, ruins your life, etc. You get to keep both pieces. If you don't like the sound of that, stay away. :)
     
  7. AusPhotoHiker

    AusPhotoHiker Premium Member

    Messages:
    1,116
    Likes Received:
    158
    Location:
    Australia

    -Return to Top-

    Hi Fonz,

    Yes, that would be the v9.12 on his website. I sent him links to XP1 rawfiles and he responded with the test source code after a week or so.

    Also worth noting I have not heard from Dave since he sent the 9.13test sourcecode to me. It is possible there are updates and I'm sure he will have been working on D800, 5Dmk3 etc, so there is likely a newer test version he might share if you email him yourself.

    Happy to share the test source and Mac OS (Lion) executable I built with you if you would like to give it a try.
     
  8. jknights

    jknights Moderator Staff Member

    Messages:
    9,188
    Likes Received:
    1,215
    Location:
    Oliva, Valencia, Spain

    -Return to Top-

    Mission accomplished, files received.
    Now to test.

    Your beer count is increasing. I need to get to Adelaide.
    Thanks.


    For Macs not running Lion (e.g. Snow Leopard or Leopard) then you can put in /opt/local/bin/ directory.
     
  9. AusPhotoHiker

    AusPhotoHiker Premium Member

    Messages:
    1,116
    Likes Received:
    158
    Location:
    Australia

    -Return to Top-

    Yes. It doesn't really matter where it goes, best if it is in a bin directory in your $PATH

    Type env in a terminal window to find out.

    Adelaide is a long way from Valencia, but be happy to see you when you get here :)
     
  10. AsylumPHoto

    AsylumPHoto Premium Member

    Messages:
    629
    Likes Received:
    67

    -Return to Top-

    Nifty. Hopefully since an open source raw converter seems to be working, that means the big time companies (*cough*Adobe*cough*) won't be far behind.
     
  11. jknights

    jknights Moderator Staff Member

    Messages:
    9,188
    Likes Received:
    1,215
    Location:
    Oliva, Valencia, Spain

    -Return to Top-

    Well thanks to Mike I am ahead of them and it all runs on all my machines after a recompile. So this works on Leopard, Snow Leopard and Lion. ML users need to wait ;-)
     
  12. AsylumPHoto

    AsylumPHoto Premium Member

    Messages:
    629
    Likes Received:
    67

    -Return to Top-

    Now the question is... is this better than Silkypix?

    I haven't had time to install Silkypix on my SL machine at home...
     
  13. rsponholtz

    rsponholtz New Member

    Messages:
    3
    Likes Received:
    0

    -Return to Top-

    Could I get a copy of the source code? I'm on a PC, and would like to compile & use for RawTherapee (which uses dcraw under the wraps)..

    Thanks!
     
  14. jknights

    jknights Moderator Staff Member

    Messages:
    9,188
    Likes Received:
    1,215
    Location:
    Oliva, Valencia, Spain

    -Return to Top-

    I will defer to AusPhotoHiker to answer this as he obtained the beta code.
     
  15. AusPhotoHiker

    AusPhotoHiker Premium Member

    Messages:
    1,116
    Likes Received:
    158
    Location:
    Australia

    -Return to Top-

    Sure you can, just pm your address to either jknights or I and we'll send it over.

    (Jonathan feel free, it's not my code, and it's under free license - there are few restrictions, and sharing the code is not one of them) :)

    While we're at it, here are the conditions, they are in the source:

    Code:
       dcraw.c -- Dave Coffin's raw photo decoder
       Copyright 1997-2011 by Dave Coffin, dcoffin a cybercom o net
    
       This is a command-line ANSI C program to convert raw photos from
       any digital camera on any computer running any operating system.
    
       No license is required to download and use dcraw.c.  However,
       to lawfully redistribute dcraw, you must either (a) offer, at
       no extra charge, full source code* for all executable files
       containing RESTRICTED functions, (B) distribute this code under
       the GPL Version 2 or later, (c) remove all RESTRICTED functions,
       re-implement them, or copy them from an earlier, unrestricted
       Revision of dcraw.c, or (d) purchase a license from the author.
    
       The functions that process Foveon images have been RESTRICTED
       since Revision 1.237.  All other code remains free for all uses.
    
       *If you have not modified dcraw.c in any way, a link to my
       homepage qualifies as "full source code".
    And Dave's hmepage: http://www.cybercom.net/~dcoffin/dcraw/
     
  16. AusPhotoHiker

    AusPhotoHiker Premium Member

    Messages:
    1,116
    Likes Received:
    158
    Location:
    Australia

    -Return to Top-

    Now that we have a few people trying out dcraw, there are a few things to take note of.

    1) There is a manual page in unix style at http://www.cybercom.net/~dcoffin/dcraw/dcraw.1.html

    2) If you strike a program error, please report it here or directly to Dave. If you report to Dave, make sure you tell him the version you are using is 9.13test

    3) Dave's page has a FAQ that may bear reading.

    4) This is free software, but Dave accepts donations on his website. There is no requirement however.

    Output options from the manual are interesting:

     
  17. DrRoot

    DrRoot New Member

    Messages:
    4
    Likes Received:
    1

    -Return to Top-

    The version is 9.15test. ;-)
     
  18. AusPhotoHiker

    AusPhotoHiker Premium Member

    Messages:
    1,116
    Likes Received:
    158
    Location:
    Australia

    -Return to Top-

    No it isn't :)

    The version I have sent out to anyone here is 9.13test

    From the source:

    Code:
    #define DCRAW_VERSION "9.13test"
    Also, from the command line:

    Code:
    $ ./dcraw 
    
    Raw photo decoder "dcraw" v9.13test
    by Dave Coffin, dcoffin a cybercom o net
    
    Usage:  ./dcraw [OPTION]... [FILE]...
    The current stable version on Dave's site is 9.12, so it makes sense that the test version is 9.13test
     
  19. jknights

    jknights Moderator Staff Member

    Messages:
    9,188
    Likes Received:
    1,215
    Location:
    Oliva, Valencia, Spain

    -Return to Top-

    After installation of dcraw on my machines.
    I put all my images to be processed in a single directory.
    I then open a Terminal session in the directory with the images.
    I then type. dcraw -W -T *.RAF

    This batch processes all the images to Tiff file which can then be edited in your favourite editor.

    This is a smooth and easy process.
    There is a but..... Which is that since you dont see the image before processing that you dont get a chance to do any tweaks until later.
    I have found that for correctly exposed images all I need to do is a quick Levels/Curves adjustment and then sharpen. I then do a Save As JPG and delete the TIFF unless I want to work on it more. You can always regenerate it if you have the RAF file.
     
  20. AusPhotoHiker

    AusPhotoHiker Premium Member

    Messages:
    1,116
    Likes Received:
    158
    Location:
    Australia

    -Return to Top-

    I was tinkering with dcraw today, comparing more images between the camera jpeg and the dcraw tiff, and I noticed that dcraw images are slightly larger than the jpegs.

    In camera jpegs are 4896 × 3264 and the dcraw tiffs are 4952 × 3288

    According to Dave Coffin, it's because the edges are processor intensive to interpolate so most in camera jpeg engines just crop the edges off the image. Ha!

    Anyway, good to know. If you find a jpeg has marginally cropped something in the image, the raw just might have it all for you.
     

Share This Page