DCRAW and CJPEG for Mac

The following scripts are useful for using dcraw (see installation below) and cjpeg (pre-installed on most Macs) to recursively convert raw image files within a directory. These scripts require Ruby (pre-installed on most Macs) and Homebrew.

  1. /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  2. ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
  3. brew install dcraw
  4. for i in *.CR2; do dcraw -c -q 3 -a -w -H 5 -b 5 $i | cjpeg -quality 90 > $i.jpg; done
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s