Fun things to do with computers and photographs
Random header image... Refresh for more!

write

Synopsis

photohack generate images tags options
This command generates output images. The images to be generated are selected by the given image IDs and tags. The processing options applied to the images are obtained from options specified for the album, the options specified for the image, and then the options specified on the command line.

Description

The images are selected by image IDs and tags. Any images or tags that don’t make sense are ignored silently. All selected images are generated in a single output format (such as “web,” “4×6”, “titled,” and so on).

Processing options for the images are obtained from the following three locations, with each location possibly overriding options specified in the previous location:

  1. Options specified for the album (using the album command)
  2. Options specified for the image (using the options command)
  3. Options specified on the command line to generate

For example, if the album has contrast+20 set, and the command line contains contrast-5, then contrast-5 will be used when processing the image.

An output format must be specified to generate output images, usually on the command line. For example, @web will select the “web” output format. The output format can be set in the options for an individual image, but not for a whole album. It only makes sense to specify one output option at a time – photohack won’t know what to do if you have more than one… (idea for future enhancement)

There are several types of options accepted by generate, which are described in more detail on the photohack options page. The generate command accepts the following types of options on the command line:

  • Output format (@y option)
  • Cropping
  • Image processing
  • Output size and resolution

Note that RAW conversion options cannot be specified on the command line. This is because photohack caches the converted RAW file, and if you could put RAW conversion options on any command line then it won’t know when it can use the cached file and when it has to regenerate it.

Special formats

Photohack treats the following formats specially:

@index
Write an index file. An “index” file is an image that has the cropped image shown in the context of the full image, RBG histograms, and some of the image metadata. They are generated into the directory Generated/Index.
@proof
Write a proof file. A proof file has no processing performed on it, and whereever possible is extracted from the thumbnail image contained in the RAW file. If that doesn’t exist, then it uses an equivalent JPEG file if one exist, otherwise probably fails. The proof file is annotated with some basic image data. They are generated into the directory Camera/Proof.

Examples

Generate an image in web format:

$ photohack generate @web 7

Generate a range of images in “titled” format:

$ photohack generate 7 8 12-16 @titled

Generate all images with the tags “selected” in full size:

$ photohack generate @full selected

Generate index files for all images tagged “selected”:

$ photohack generate @index selected