CRWInfo

Extracts exposure information and thumbnails from Canons proprietary RAW files.

What this is:
A patchwork of educated guesses and deductions on the files produced by a D60. 

What this is not:
Guarenteed to work with crw files that other canon models (D30) can produce.
A program that is condoned by or was written with the help of Canon in any
way.

What can be extracted:
- Thumbnails (the most important part :) )
- Time and Date when the photograph was shot
- Camera owner
- Camera serial number
- Camera model
- Camera firmware
- Shutter speed (and bulb duration if bulb was used)
- f-stop used
- ISO setting
- Creative Mode set (i.e. A-DEP, M, Av, Tv and P)
- AF Mode
- Metering mode
- Index number, if the photo was shot in a sequence/burst
- Shutter delay
- Driver mode (i.e. single or continuous shot)
- White point mode 
- Exposure compensation
- Focussed range
- Zoom range of lens
- Focal lenth used
- Flash mode
- Flash compensation
- Parameters set (Contrast, Sharpness, Saturation and Color Tone)
- Orientation
- AEB sequence number
- AEB bracket value
- Custom Function settings

What's missing:
- The histogram (no idea where it's stored in the crw file, or if it's stored
  there at all)
- The color temperature/sRGB values of the selected whitepoint
- the exposure mode used, if not a creative mode 

Useage:
crwinfo [-a] [-c] [-cf] [-e] [-f] [-l] [-m] [-p] [-t [filename]] [-x] file.CRW
-a: Show all information, except "experimental" information 
-c: Show camera information (camera model, serial number, etc)
-cf: Show the custom function settings
-e: Show basic exposure information (shutter speed, f-stop, etc)
-f: Show flash information (flash mode, etc)
-l: Show lens information (zoom range, range in focus, etc)
-m: Show misc. information (whitepoint, AF mode, etc)
-p: Show exposure parameters used (saturation, sharpness, etc)
-t: extracts the thumbnail to the optional filename. If no filename is given,
    the filename of the CRW file is used, and the .crw extention is replaced
    by the .jpg extension.
-x: Show "experimental" information (i.e. data fields I'm not sure of what
    they display yet. See the spec file for a list of these fields. Some
    fields change their values even with shot with the exact same settings
    with the lenscap on. I don't have much of a clue what they could be, since
    the data seems to be more or less random. Maybe signature/hash/crypt-key
    information? Other fields vary slightly with similar pictures. I'm
    guessing color temperature/gamma here.


spec file:
The program "rip" by peter@wonderland.org was used to rip the information
section of the CRW file. Offsets are counted from the beginning of this
informational section. See http://www.wonderland.org/crw/ for the source code
of rip (you will have to replace strlcmp and strlcpy with strncmp and strncpy
in the sources to make them compile under unix).


Caveats:
- All field values (and offsets and sizes) were deducted by comparing (lots
  and lots) of different files. The information isn't necessarily correct, as
  this was done entirely as deductions and guesswork. Canon was lame enough to
  not open up any specs.

- The f-stop range 1.0 - 1.6 and 45 - 91 is just guessed. If anyone could send
  me the appropriate values (or get me a corresponding lens so that I can get
  the values :) ) for verification purposes, that would be great.

- There are still quite a few fields whose values change, but I don't (yet)
  know what they represent. See the specs file if you're interested.
  (Uhm, looks like I wisely saved an old copy of the file over my new one. Not
  that many experimental fields marked there anymore. Uhm. Wait until the next
  version is released :) )

2002/07/15
sven.riedel@tu-clausthal.de
