![]() |
![]() |
|
|
|
|
|
Taking so many pictures of Amaya really expanded my horizons for photography and whetted my appetite for more serious gear, so a few months ago I picked up a new Nikon D50 DSLR. It's a pretty sweet camera, instantly responding to any command, whether it's power-on, autofocus, shutter release, or even scrolling through images on the LCD. As you would expect, it has lots and lots of obscure configuration options that I naturally wanted to play with.
At some point I set it up to take photos in the Adobe RGB color space, which can represent a wider range of colors than the sRGB color space that most consumer digital cameras use and the D50 uses by default. (sRGB is the “lowest common denominator” color space, designed to represent the colors that a cheap-o 1986-era CRT monitor could reproduce.) This is just fine, so long as all I want to do is view my photos on my nice color-managed Mac, but the world is full of color-crippled Windows and Linux apps. (Actually, even the OS X version of Firefox is crippled.) These apps don't know squat about color spaces — they just push the RGB values in the file straight to the monitor, and monitors are set up to act like sRGB devices by default.
To make a long story short, if I simply upload an Adobe RGB photo to my website, 97% of the world (basically anybody who's not using Safari on OS X) will see something totally different than I do, because they'll be treating it like an sRGB photo. They'll see a photo with dull, drab colors. What's needed is to do a conversion to sRGB before uploading.
So I started looking for utilities to do color conversion in bulk at the command line. It was surprisingly hard to find information about this! Most pros use Photoshop for this, and those who aren't pros generally don't have a clue about color spaces. It turns out there are a few options. There is an open-source color management system (CMS) called “Little CMS“ that includes a utility called “jpegicc” for color matching jpeg files. Unfortunately, this program strips all the EXIF tags from the file. There's also the “convert” command from the ImageMagick project, which in newer versions can be linked to Little CMS to enable color conversion. This works much better, preserving all of the EXIF tags from the original file and offering lots of other nifty options as well. If you're using Panther or newer and don't want to install ImageMagick, there's also the sips “Scriptable Image Processing System” utility included with OS X. The -m flag (which is documented in “sips -h” but not the man page) allows you to convert to a given profile. (Apple calls this “matching” to a profile, which to my ear doesn't suggest the lossy color conversion process.) This keeps many but not all of the EXIF tags from a photo. On my test photo it retained 88 out of 145 EXIF tags found by exiftool. I haven't analyzed the tags it dropped, so you'll have to check it out yourself if you decide to go this route.
|
|
![]() |
![]() |



