Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project!

## [8a5fe8]: enblend.doc / enblend_4.0.0.xhtml / Response-Files.xhtml Maximize Restore History

### Response-Files.xhtml    189 lines (183 with data), 14.0 kB

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 

3.1 Response Files

A response file contains names of images or other response filenames. Introduce response file names with an at-character (â@â).

Enblend and Enfuse process the list INPUT strictly from left to right, expanding response files in depth-first order. (Multi-layer files are processed from first layer to the last.) The following examples only show Enblend, but Enfuse works exactly the same.

Solely image filenames.
Example:
enblend image-1.tif image-2.tif image-3.tif

The ultimate order in which the images are processed is: image-1.tif, image-2.tif, image-3.tif.

Single response file.
Example:
enblend @list

where file list contains

img1.exr           img2.exr           img3.exr           img4.exr

Ultimate order: img1.exr, img2.exr, img3.exr, img4.exr.

Mixed literal names and response files.
Example:
enblend @master.list image-09.png image-10.png

where file master.list comprises of

image-01.png           @first.list           image-04.png           @second.list           image-08.png

first.list is

image-02.png           image-03.png

and second.list contains

image-05.png           image-06.png           image-07.png

Ultimate order: image-01.png, image-02.png, image-03.png, image-04.png, image-05.png, image-06.png, image-07.png, image-08.png, image-09.png, image-10.png,

3.1.1 Response File Format

Response files contain one filename per line. Blank lines or lines beginning with a sharp sign (â#â) are ignored; the latter can serve as comments. Filenames that begin with an at-character (â@â) denote other response files. Table:response-file-format states a formal grammar of response files in EBNF.

response-file ::= line*
line ::= (comment | file-spec) [â\râ] â\nâ
comment ::= space* â#â text
file-spec ::= space* â@â filename space*
space ::= â â | â\tâ

where text is an arbitrary string and filename is any filename.

Table 3.1: EBNF definition of the grammar of response files.

In a response file relative filenames are used relative the response file itself, not relative to the current-working directory of the application.

The above grammar might unpleasantly surprise the user in the some ways.

Whitespace trimmed at both line ends
For convenience, whitespace at the beginning and at the end of each line is ignored. However, this implies that response files cannot represent filenames that start or end with whitespace, as there is no quoting syntax. Filenames with embedded whitespace cause no problems, though.
Comments in response files always occupy a complete line. There are no âline-ending commentsâ. Thus, in
# exposure series           img-0.33ev.tif # "middle" EV           img-1.33ev.tif           img+0.67ev.tif

only the first line contains a comment, whereas the second line includes none. Rather, it refers to a file called âimg-0.33ev.tifÂ #Â "middle"Â EVâ.

An at-sign invariably introduces a response file, even if the filename's extension hints towards an image.

If Enblend or Enfuse do not recognize a response file, they will skip the file and issue a warning. To force a file being recognized as a response file add one of the following syntactic comments to the first line of the file.

response-file: true      enblend-response-file: true      enfuse-response-file: true

Finally, here is an example of a valid response file.

# 4\pi panorama!       # These pictures were taken with the panorama head.      @round-shots.list       # Freehand sky shot.      zenith.tif       # "Legs, will you go away?" images.      nadir-2.tif      nadir-5.tif      nadir.tif

Comments that follow the format described in Table:response-file-syntactic-comment are treated as instructions how to interpret the rest of the response file. A syntactic comment is effective immediately and its effect persists to the end of the response file, unless another syntactic comment undoes it.

syntactic-comment ::= space* â#â space* key space* â:â space* value
key ::= (âAâ .. âZâ | âaâ .. âzâ | â-â)+

where value is an arbitrary string.

Table 3.2: EBNF definition of the grammar of syntactic comments in response files.

Unknown syntactic comments are silently ignored.

3.1.3 Globbing Algorithms

The three equivalent syntactic keys

control the algorithm that Enblend or Enfuse use to glob filenames in response files.

All versions of Enblend and Enfuse support at least two algorithms: literal, which is the default, and wildcard. See Table:globbing-algorithms for a list of all possible globbing algorithms. To find out about the algorithms in your version of Enblend or Enfuse team up the options --version and --verbose.

Example:

# Horizontal panorama      # 15 images       # filename-globbing: wildcard       image_000[0-9].tif      image_001[0-4].tif