RAW Jpeg extraction & Linux

Replies:

  • None.

Parents:

  • None.
Just a small script for those of you who shoot in RAW format...
In Canon's RAW, there is a jpeg file inside the file structure, it can be
extracted by a small tool written by David Coffin [1][2].
I used gcc heap.c -o crwheap
and here is a script that extract the jpeg from the RAW headers, add EXIF
informations taken from the thumbnail file associated (the .thm), and
rename the file according to the date in the EXIF.
Unfortunately, there is no real way of processing RAW files on linux
(expect via Wine :) )

#!/bin/sh

for i in *.crw ; do
       basen=`echo $i | sed 's/\.crw$//'`
       crwheap $i > /dev/null
       jhead -te ${basen}.thm ${basen}.thumb.jpg
       epinfo -r -f "/dump/%Y/%m/%d/eos%Y%m%d%H%M%S.jpg" ${basen}.thumb.jpg
done

[1] http://www2.primushost.com/~dcoffin/powershot/
[2] http://www2.primushost.com/~dcoffin/powershot/heap.c

--
~~Yves

HURL: fogo mailing list archives, maintained by Gerald Oskoboiny