[KimDaBa] bulkin' up with KimDaBa and Bash

havoc havoc at harrisdev.com
Tue Mar 22 01:06:37 GMT 2005


As I have described earlier, I keep a parallel tree of JPEG thumbnails 
(800x533), which mirror the RAW tree. I KimDaBa only sees the JPEG tree.

This has always made prepping images for print a royal pain. Being too 
lazy to write a proper Perl script to handle things, and deciding that I 
actually needed to learn how to make Bash to useful things, I have 
created a bash one-liner which uses recurses over a list of images with 
dcraw (RK's version), and a color profile to convert the images to JPEG, 
and dump them into a target directory.

I just select the images I want to convert in KimDaBa, then drag and 
drop onto the terminal window (I'm using konsole).

for image in list_of_files; do image=${image/\.jpg/}; 
image=${image/\/photo\//\/photo_originals\/}; echo "image --> "$image; 
dcraw -4 -c -w  $image.crw | pnmnorm -bpercent 0 -wpercent 0.1 
-brightmax | pnmtotiff >/tmp/temp.tif; tifficc -i 
Personal_files/image_tools/eos10d-linear-8apr2004.icc /tmp/temp.tif 
/tmp/temp2.tif; convert -quality 100 -unsharp 5x1+1.2 /tmp/temp2.tif 
path/to/target_dir/${image/*crw_/crw_}.jpg; done

'/photo/' is the path of my JPEG directory, which kimdaba is looking at. 
'/photo_originals/' is the path to my RAW files. You'll want to replace 
'crw' with the raw extension of your camera.

replace 'path/to/target_dir' with the target path, and then delete 
'list_of_files' and drop your kimdaba selection with the courser there.

You may want to tweak or remove ImageMagick's 'unsharp' settings.

Any tips that would improve my final image quality would be greatly 
appreciated.

jody
-- 
http://www.RealizationSystems.com/ -- start communicating
http://www.GalacticSlacker.com/ -- read it and weep
http://www.NMPerspective.com/ -- a Southwest Perspective



More information about the Kphotoalbum mailing list