## Output directory

You set the thumbnail write parameters with the `-o` option. This is a pattern which the input filename is pasted into to produce the output filename. For example:

    $ vipsthumbnail fred.jpg jim.tif -o tn_%s.jpg

For each of the files to be thumbnailed, `vipsthumbnail` will drop the extension (`.jpg` and `.tif` in this case) and then substitute the name into the `-o` option, replacing the ``s`` So this example will write thumbnails to `tn_fred.jpg` and `tn_jim.jpg`.

If the pattern given to `-o` is an absolute path, any path components are dropped from the input filenames. This lets you write all of your thumbnails to a specific directory, if you want. For example:

    $ vipsthumbnail fred.jpg ../jim.tif -o /mythumbs/tn_%s.jpg

Now both thumbnails will be written to `/mythumbs`, even though the source images are in different directories.

Conversely, if `-o` is set to a relative path, any path component from the input file is prepended. For example:

    $ vipsthumbnail fred.jpg ../jim.tif -o mythumbs/tn_%s.jpg

Now both input files will have thumbnails written to a subdirectory of their current directory.