digiKam for 35mm film photographers, Part 1

It may sound strange to some. After all, digiKam is for digital cameras, it says so in its very name. However, nowadays all photographs eventually end up in a digital format, and so I tend to think of photographic film as a form of light sensor with certain, quite favorable qualities. This article, split into two installments, deals with film photography in a digital world, and a tool I wrote to support its use. This first part is about the why. The second part will demonstrate the tool and explain how to use it.

How it all started

A couple of weeks ago I started working on a new tool for the digiKam photo management application. My newly discovered love for shooting 35mm film culminated in buying a Canon EOS-3 SLR and a scanner and I have spent a lot of time trying to get good results from scanning the color negatives directly. It's a problematic process, to say the least.

One of the my reasons for shooting film is how it presents color on the final paper prints, but it's tough to recreate that if you don't scan from prints (it's expensive) but from the developed negative. Getting rid of the orange mask is a trivial challenge, but going from there to a pleasantly looking image on a computer LCD is not. How to develop the films "signature color" without non-reproducible manual intervention?

I started with VueScan which presents itself to be well set for color negative scanning. It got some good, initial results for easy images, but its internal automation is too easily thrown off path. Photos of blue sky? Forget it, the automatic correction creates a muddy gray or mauve but no blue. Also, the amount of film profiles is very limited, for example there are only few Kodak films and none of them are recent. No "New Portra" 160 or 400, no Ektar 100. And yes, you need those profiles to go from a raw, linear scan to something that looks like an photo. Another thing about VueScan is that I don't know what it does and I keep asking myself, is this really how Kodak Gold should look? This ultimately leads to the question of how to recreate the color "signature" of a certain film instead of just getting an "image with nice colors".

Searching for inspiration

When googling for what others do one finds a lot of descriptions of "best settings" for Silverfast or VueScan but nothing that you could devise a script detailing the steps one would need to perform in order to go from Negative to final Image with basic image manipulation tools. Still Google spit out an inspiring article from fellow blogger Obakesan, a Negative-scanning tutorial providing basic input on how to perform most of the necessary steps with the simple level adjustment tool found in any image manipulation software. That article was what eventually culminated in the tool I have written and that just got released together with version 2.6.0 of digiKam, and which I christened, unceremoniously, "Color Negative Inverter", for this is what it does.

The tutorial had a lot of steps to perform manually and didn't fulfill my requirement for reproducibility of images, like hand-adjusting the levels and then manually correcting the colors. You get a photo that looks good as a result but your wife will tell you that her dress had a totally different color that day. Trying to achieve that I went looking for characteristics of film from which I could compute the necessary settings.

How color film works

Chemical film in any format comprises of a plastic carrier film that is coated with light sensitive material. Color negative film for the standard C41 process has three such layers which are sensitive to red, green and blue light and then form a cyan, magenta and yellow color dye. The more light of a specific wavelength hits the film, the higher the density of the resulting color dye. The relation between wavelength, illumination and density is known and published by the film manufacturers in data sheets, like this:

Looking at these one finds that the dye densities for cyan, magenta and yellow map a relatively small density range to a quite large illumination range, and that density range decreases drastically from cyan to magenta to yellow. This mapping has to be translated into parameters for a computer algorithm.

How the Color Negative tool works

First of all, the input data is a linear, raw scan of the film negative, with no corrections like white balance, gamma or tone curve applied. Also, it should be a well exposed scan, using the full dynamic range of the scanner, without clipping of any color channel to null or full scale. Each channel should be represented with 16 bit. The color profile of the scanner output should be known. Your scan program must be able to provide this. I know no free Linux scan program doing that, so I bought VueScan by Hamrick Software. The histogram of such a scan will look like this:

As one can see, the red color channel occupies the widest range while blue has the smallest range. The brightest values of each channel together represent the color of the orange mask. If you adjusted the levels so that the maximum input of each channel matched these values, the orange mask would turn into bright white. This is what the Color Negative tool does to remove the mask.

To map the input range for each channel, one also needs to compute the minimum input. For this task the density profile of the film is used. For Kodak Gold 200, the maximum density just before the shoulder (around the 0.0 point of the exposure axis in the above diagram) is (1.53, 2.00, 2.40) for R, G and B, on a log10 scale. Since we're still talking about a negative image, the maximum density is equal to the minimum brightness. You just need to transform the logarithmic density from the diagram into a linear value. Then apply a gamma correction (globally and to each channel to balance the colors) and you're pretty much there, you just need to invert the image. 

This is as far as the Color Negative tool will take it. From there it's a bit like working with RAW files from a digital camera: You may need to fix the levels and adjust the white balance and tone curve, or use any of the digiKam tools to tweak the photo until it suits your taste.

Collecting film profiles and samples

As best results are achieved with matching profiles for each film, I had to collect data sheets. Not many companies nowadays make C41 film and most of them are by either Fuji or Kodak. I tried finding as many recent and not so recent or even discontinued film data sheets as Google would find. I actually tried verifying the profiles by shooting a roll of each to see how it goes, but some are hard to find today. I think I achieved a good coverage but for some brands like DM Paradies that are re-branded Kodak or Fuji film stock no data sheets exist. For example, some say DM Paradies is Kodak Gold, but looking at the scans I somehow doubt that. If you find data for obscure brands my tool doesn't support yet, I'd be happy to hear about it. Just send me the PDF containing a density diagram like I've shown above. You can additionally send scans to verify the result, just make sure they are linear uncorrected scans with 16 bit per channel. They should also have a bit of the orange mask color around the actual photo. Even better, send me a roll of the film :)

What next?

The basic functionality of the tool is complete, but I would like to add a few features and of course more profiles. One feature will be automatic detection of orange mask values, which is pretty easy to do. For now there is only a color picker so you need to perform a few clicks manually, but fortunately you only need this once for every roll of film, if your scanner has consistent output from picture to picture within a roll. The automatic white point calculation for the negative only requires a bit of searching in the histogram bins and therefore will be easy to do. Suggestions for improving the user interface and also the quality of the conversion? I would certainly like to hear your suggestions.


Stop Racism!

You may know that the nationalists party in Sweden just managed to enter parliament for the first time. The reaction of the Stockholm people is quick and concise: they're all out on the streets protesting against racism. I found this photo on flickr, my contact Sean was out on the street with his camera and managed to take this fantastic photo! It's marvelous, the way it captures the moment is brilliant. Go and visit his photo stream, there are many more from the "No to SD" demonstration, and say NO to Racism, wherever you can!


ur iphone, ur holdin eet wrong

You know, when the new iPhone 4 was shown to the world, The Steve raved about how the sleek design was achieved by totally making the antennas part of frame. I scratched my head and said to myself, wow, if this works it'll be quite an achievement. Antennas don't like touching. Especially not near the ends where the electric field builds up.

Now, looks like I was too pessimistic about the matter. Of course the antennas do work. You just need to always hold the phone in your right hand. And be cautious where the pinky finger goes. No, NOT right there.

The response of Apple to this matter is just hilarious, as Engadget notes.


Tour Eiffel

Tour Eiffel
Originally uploaded by thinkfat
On Sunday evening Eva and I returned from a long weekend in Paris. We went there with our friends Andrea and Sergio to spend some time in Paris for leisure and to take photos, of course. Sergio and I also went on a night tour with a photo guide, Gilles, who showed us around and gave tips for nice motives in the City of Lights.

I will be posting some photos on my flickr account during the next days.


Carnival Monday Marathon

Originally uploaded by thinkfat
I like carnival parades! There's no other opportunity to take photos of smiling people, enjoying themselves, in colorful costumes, actually wanting to be seen.

This was my second year joining the crowd in Mayence during the Carnival Monday parade. I love to go there. It is a relaxed and joyful atmosphere and you can get really close to the people, interacting with them. The security is minimal, everybody is just having fun and does not mind a photographer running across the street, diving into the parade, taking images like crazy.

I used only the 45-200 zoom and it did not disappoint. It's fast to focus, light and sharp and the OIS really helps. I filled three memory cards with almost 1000 photos. The set on flickr contains approximately 120 images which I liked most. Many of them are Jpegs right out of the camera, just resized for presentation, some I had to lay hands on, some were developed from RAW.

Come, see and enjoy!