How Can We Help?
< Back
You are here:

DCRAW is used by the micaToolbox for loading the RAW images from a huge range of cameras. Huge thanks to Dave Coffin for developing this amazing piece of software. Dave Coffin has ceased developing DCRAW, however the project is being continued in other forms (e.g. libRaw).

DCRAW for Windows and Linux seems to work reliably across different operating systems, however, MacOS sometimes requires re-compilation of DCRAW. If the Toolbox does not work with the supplied files and throws out an error message when opening a RAW image you will need to compile your own DCRAW binary file (this is the bit of software that converts the RAW image into a usable image for ImageJ).

  1. Create a new folder on your desktop (e.g. called myDCRAW).
  2. Get the original source code for DCRAW from this website:
  3., if you’re not prompted to save, in your browser go File>Save Page As.. and save the code as “dcraw.c” in your “myDCRAW” folder.
  4. Open System Preferences, Choose the Keyboard option and then the “Shortcuts” tab. Under “Services”, check the New Terminal at Folder option. Close System preferences.
  5. Right-click your myDCRAW folder and choose the “New Terminal at Folder” option. A terminal will load up, you can check it’s in the right location by typing “ls” and hitting enter, it should list dcraw.c in response.
  6. Paste the following command into the terminal and hit enter: llvm-gcc -o dcraw dcraw.c -lm -DNO_JPEG -DNO_LCMS -DNO_JASPER
  7. As you hit Enter, the computer will download, compile and install the source code. Ignore the warning messages on the terminal. When it is done, check the myDCRAW folder and there should be a file (grey with green “exe” label) named ‘dcraw’.
  8. Copy this dcraw file (not dcraw.c) across to your imagej/plugins/dcraw folder, and rename it “dcrawMac”, overwriting the existing file.
  9. Check whether it works in ImageJ by going plugins > micaToolbox > Tools > DCRAW Import and try to load a RAW image.
  10. If it doesn’t work it’s possibly because the executable dcraw doesn’t have permission to run. To give it permission enter this into the terminal (you may need to specify a different path if you’ve placed imagej elsewhere): chmod 777 /Applications/ImageJ/plugins/dcraw/dcraw
Compile DCRAW for MacOS
Table of Contents