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).
- Create a new folder on your desktop (e.g. called myDCRAW).
- Get the original source code for DCRAW from this website:
- http://www.dechifro.org/dcraw/dcraw.c, 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.
- Open System Preferences, Choose the Keyboard option and then the “Shortcuts” tab. Under “Services”, check the New Terminal at Folder option. Close System preferences.
- 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.
- Paste the following command into the terminal and hit enter: llvm-gcc -o dcraw dcraw.c -lm -DNO_JPEG -DNO_LCMS -DNO_JASPER
- As you hit Enter, the computer will download Xcode.app, 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’.
- Copy this dcraw file (not dcraw.c) across to your imagej/plugins/dcraw folder, and rename it “dcrawMac”, overwriting the existing file.
- Check whether it works in ImageJ by going plugins > micaToolbox > Tools > DCRAW Import and try to load a RAW image.
- 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