## External tools

### Raw Import Options

Each time the user:

- loads a single raw file in the main workspace
- specifies a set of raw files in the File > New Hdr... wizard

a RAW->TIFF conversion transparently takes place by calling the dcraw executable (by Dave Coffin). Luminance HDR calls dcraw to convert a raw file to a (either 8 bit or 16 bit) TIFF file.

You can tweak the way dcraw operates by setting specific command line switches (aka options or parameters) in the External tools tab of Preferences dialog.

The -T switch (TIFF output, see below) is the only required parameter. In this particular case we have also specified the optional -4 parameter to ask dcraw to obtain a 16 bit (TIFF) file.

Starting with Luminance HDR 1.9.3 the default options for calling dcraw are -T -4 -q 3. The DCRaw's manual page lists all the available options. An excerpt, being quite long, is available separately, for the latest manual page please follow this reference.

### Alignment options

Luminance HDR can optionally use align_image_stack command line tool bundled with Hugin, a panorama stitcher, for the alignment of slightly misaligned images. When several differently exposed images are taken in the process of creating a High Dynamic Range image, the images are not perfectly aligned, and the quality of the HDR image created will suffer from this. align_image_stack uses the tools available to hugin to optimize the roll, pitch and yaw, as well as some parameters of the lens geometry, to align the images.

align_image_stack doesn't have a lot of relevant options, so we list them here:

-a prefix
  Output aligned images as prefix_xxxx.tif
-e
  Assume input images are full frame fish eye (default: rectilinear)
-t num
  Remove all control points with an error higher than num pixels (default: 3)
-f HFOV
  Approximate horizontal field of view of input images, use if EXIF info not complete
-m
  Optimize field of view for all images, except for first. Useful for aligning focus stacks with slightly different magnification.
-c num
  Number of control points (per grid) to create between adjacent images (default: 8)
-l
  Assume linear input files
-s scale
  Scale down image by 2^scale (default: 1 [2x down-sampling])
-g gsize
  Break image into a rectangular grid (gsize x gsize) and attempt to find num control points in each section (default: 5 [5x5 grid])

By default Luminance HDR just defines prefix for aligned images: `-a aligned_`.