Archive for December 2005

 
 

Canon CR2 raw format to JPG conversion script

The exiftools were the missing piece to restart the usage of the RAW format with my Canon 350d. The simple usage of the RAW format without the generation of JPG files within the camera doesn’t fill the storage card quite as fast. My primary reason for using RAW is the storage of all the pictures in a loss-less format and thereby having later the option to process the pictures in 16bit. And of course it’s simpler to fix color issues or to get to the last bit of information in under- or overexposed pictures.

Anyway, so I’ve whipped up this little Perl script, which basically renames the RAW files in a directory or given as an argument into my favorite file name format. Then the pipeline dcraw -w -c <file>.cr2 | convert -quality 90 -unsharp 0.1 ppm:- <file>.jpg is executed, which produces the JPG file. Then exiftool is executed to copy the meta data from the RAW into the JPEG file. Finally exitool is executed again to clear the orientation flag, since dcraw already produces correctly oriented output. The usage() message:

usage:
./cr2tojpg.pl [-force|-output dir|-renameonly|-format pat|-h|-help] [file ...]

    -force:      force conversation of RAW file into JPG. Without this option,
                 if the destination file is already present, no conversion is
                 done.
    -output dir: put all generated files into directory dir.
    -renameonly: don't do any conversion, only rename the RAW files according
                 to the file name pattern.
    -format pat: Default pattern is '%Y-%m-%d-%H%M%S', which resolves to
                 something like 2005-10-31-193510.jpg. See manual page for
                 POSIX function strftime() for possible arguments.
    -h|-help:    display this usage message

    If additional file arguments are given only these files will be converted.
    Otherwise all files ending with CR2 or cr2 in the current directory are
    converted.

Here is the script. It does the job, but it doesn’t run very fast. It takes about 2 minutes on my 2800+ Athlon XP to convert one picture. As far as I can tell from looking at the top output, the dcraw command burns most of the CPU cycles.

To use this script the ExifTool by Phil Harvey, the ImageMagick toolkit and dcraw must be installed . Standard disclaimer: use at your own risk.

Update: Well, I don’t know how I got the above mentioned 2 minutes for one conversion (looking at the output of an ls -l I guess), but I did a new timing this morning and this resulted in 24 seconds for one conversion. This also includes an update to the latest dcraw version 7.94 and slightly different options to dcraw. My previous version was 7.65. Around version 7.70 there were significant improvements in terms of speed and quality. An update is therefore highly recommended.

Logitech X-230

This year Santa Claus brought me this Logitech X-230 PC speaker system. I’ve been living with some el cheapo speakers up to now. I’ve read some reviews on the Web about the X-230 and all were pretty positive. And these reviews were right. This speaker system really sounds great. What is amazing in particular is the amount of bass sound the mono bass speaker is producing. I’ve even turned the volume level for the bass speaker to the absolute minimum position and it is still producing a tiny notch to much bass in my opinion. On the other hand, this feeling might come from the fact, that I’ve been living for too long without some real bass sound, since the tiny ear plugs for listing to the MP3 player don’t really produce any significant bass sound. So in conclusion, I’m pretty happy with the X-230 PC sound system.

Kurz vor Heiligabend

W-Baum 2005

Und wieder ist ein Jahr ins Land gegangen. Alles ist präpariert für Heiligabend. Das ist der Baum. Dieses Jahr sind wir ungewöhnlich früh am Heiligabend mit allen wesentlich Aktionen fertig, sodass wir entspannt ausharren können.

Frohe Weihnachten euch allen / Merry Christmas to you all.

Man kann nicht immer Glück haben.

Die letzten Geschenke sind zum Glück heute noch angekommen (Amazon). Meine andere Bestellung hätte ich dann aber vielleicht doch 1 oder 2 Tage eher abschicken sollen. Ich habe bei printeria eine Bestellung von Kalendern mit eigenen Fotos nominell termingerecht aufgegeben. Eine Teillieferung ist auch pünktlich eingetroffen. Gestern habe ich allerdings einen Telefonanruf von printeria erhalten, das sie es nicht schaffen, die ausstehenden Positionen pünktlich zu liefern. Wie gesagt, man kann nicht immer Glück haben.

A State of Trance – Tune of the Year Vote 2005

So, this is it: the results of the A State of Trance – Tune of the Year Vote 2005. In general I agree with the list, although I must say, that I would have voted the lower half of the list somewhat higher. I didn’t vote this year, since no tune kept stuck in my mind like last years “Above & Beyond – No One on Earth” or “Ridgewalker ft. El – Find”. My personal favorites out of that list are (in no particular order): AvB – Shivers, Airbase – Escape, Above & Beyond – Alone Tonight, Gabriel & Dresden ft. Molly – Tracking Treasure down, Kuffdam & Plant – Summer Dream. And I would have thought, that the Sander van Doorn Remix of Police – SOS would end higher in the list. In my mind this is easily the tune, which received the most airplay.

Cool Tool

Since I bought the Canon 350D I have been shooting mainly JPG image, since RAW file became so big and filled the CF-Card so quickly. Even with an external storage device like the Vosonic 2160 the intermediate emptying of the CF-Card is somewhat impractical. In particular, when you’re traveling, you have to stay some minutes quite to let the copy complete, since you don’t want cause to much vibration while the small hard disc within the storage device is working. And another factor was, that my home operating system is Linux. While at the time there was and still is the excellent dcraw package by Dave Coffin, which provides the tool to convert the images from RAW to JPG an utility was missing to transfer EXIF data from the RAW file to the JPG file. At least I wasn’t aware of such an utility.

Just recently I took some photos under artificial light, where the automatic color balance of the camera didn’t work well enough. And the color correction of the JPG files was simply a pain. Therefore my renewed interest in the RAW format, where color correction is a much more simple process. And while surfing the Web I came across the ExifTool by Phil Harvey. This was just the tools I was missing. By executing exiftool -TagsFromFile src.cr2 dst.jpg I could transfer all the EXIF information from the RAW file to the JPG file. The current version of 5.85 seems to indicate, that the tool set is around for some time, but I wasn’t aware of it about a year ago. Now I can effectivly use RAW format again, even under Linux.