10.6: Add RAW support for some unsupported cameras

Dec 30, '09 07:30:00AM

Contributed by: Anonymous

Snow Leopard only hintMy new Olympus E-620 is not (yet) directly supported by Snow Leopard. Since I only shoot in RAW, I searched the web and found that there is a Raw.plist file that can be tweaked. However, that didn't work. I then found out that you need to tweak the RawCamera binary, too (that's a shame Apple, hiding ID Strings in a binary).

Step 1: Tweak the Raw.plist file.

Open Terminal, and run these two commands:

$ cd /System/Library/CoreServices/RawCamera.bundle/Contents/Resources
$ sudo cp Raw.plist Raw.plist.orig
Open Raw.plist using you favorite text editor and sudo, i.e.: sudo open -a textwrangler Raw.plist. My E-620 is the little sister of the E-30, so I expanded the E-30's entry to include the E-620, too. Find the entry like this:
And add the E-620 entry above, giving this:
This aliases the E-620 to the E-30, which is well supported.

Step 2: Update the Signature of the Raw.plist file

I don't know if this is really necessary; it seemed to work fine without, but you never know when this may bite you. Again in Terminal:
$ cd ..
$ sudo cp CodeResources CodeResources.orig 
$ openssl dgst -sha1 -binary Resources/Raw.plist | openssl enc -base64
Take the resulting string (something like vNX0z5VZrQjPi5OAHRi/K4N5+IA=), open CodeResources in your favorite text editor, find the Raw.plist entry, and replace the signature with the new one. In my case it now looks like this:
Step 3: Patch the CameraRaw binary to recognize your camera

It seems that the tags in Raw.plist are matched by strings generated by RawCamera. That is, when you open an image, RawCamera looks at the bits and generates an ID string like RCID_OlympusE30. This is matched in Raw.plist.

To support the E-620, I had to patch the RawCamera binary to recognize it. I replaced all occurrences of E-520 and E520 with E-620 and E620. (I chose the E-520 over the E-30, because the string lengths are the same). I did this with HexEdit (you can use the hex editor of you choice). Terminal, again:
$ cd MacOS
$ cp RawCamera /tmp
$ open -a hexedit /tmp/RawCamera
Use Find and Replace to exchange E-520 for E-620 and E520 for E620, then save the changes. You need to copy the file first, because HexEdit is not smart enough to ask for permission to write a file owned by root (TextWrangler and BBEdit are, though). After editing, copy the edited file back into the directory:
$ cp /tmp/RawCamera .
Now reboot. Afterwards, I was able to use QuickLook on E-620 images, and import them into Aperture.

[robg adds: I haven't tested this one. Any time you're modifying system files, make sure you have a current backup, just in case. I've marked this hint as 10.6 only, but it looks like the file layout is the same in 10.5, so it might work there as well.]

Comments (10)

Mac OS X Hints