icon GPSdings

gpsdings exifloc --stamp patterns

The exifloc --stamp <pat> <pos> <alpha> option allows to write text to digital camera pictures. The pattern argument <pat> controls what text will be written to the images and how it is styled. The format for this argument is described in this document.

Instead of providing the pattern directly on the command line (where you need to escape shell control characters) you can also specify a text file from which exifloc should read the pattern using the syntax @path/to/patternfile. The platform default encoding will be used to read the file.

Formatting with HTML tags

HTML may be used to control the text style. Here's an example:

gpsdings exifloc --stamp "<html><center><font size=15 face=Arial color=yellow><b>Picture taken by MR at<br>{lat} {lon}</b></font></center></html>" [...]

Font size, family and color are controlled through the font tag. The font style (bold) is set with the <b> tag. Text alignment is controlled with <center>. Line breaks are generated with <br>.

Inserting coordinates, date, and time with placeholders

Coordinates, elevation, date, and time for a particular picture can be inserted using the placeholders {lat}, {lon}, {ele} or {eleft}, and {dateTime}.

Controlling coordinate, altitude, date and time formats

Each placeholder accepts up to two format specifiers, separated by double colons (::). Double colons are therefore not allowed for other purposes inside the curly braces of a placeholder.

Coordinate formats: {lat} and {lon}

The first specifier is a geotools AngleFormat pattern that controls the geo-coordinate representation as described here. Coordinates angles are given with respect to the WGS84 reference system.

The second specifier is an extension that allows to change the hemisphere symbols and the decimal and grouping separators of the AngleFormat. It's first four letters are the hemisphere symbols in counter-clockwise order starting at north, e.g. NWSE. The two following letters - if present - will be used as decimal and group separators respectively.

A complete coordinate placeholder with both specifiers present could look like this: {lon::DD.ddddd° ::NWSO,}.
Sample output for this placeholder: 12,34567° O.

Altitude format: {ele} and {eleft}

{ele} gives the altitude in metres, {eleft} gives the altitude in feet.

The first specifier is a standard Java Decimal Format pattern as described here.

The second specifier is an extension that allows to control the decimal and grouping separators for the DecimalFormat. Its first letter will be used as decimal separator, the second - if present - as group separator.

A complete altitude placeholder with both specifiers present could look like this: {ele::#0.0::,}.
Sample output for this placeholder: 1234,5.

Date and time formats: {dateTime}

The first specifier is a standard Java SimpleDateFormat pattern as described here.

The second specifier is an extension that allows to set the time zone for the date format. It will be passed unchanged to Java's TimeZone.getTimeZone method.

A complete date and time placeholder with both specifiers present could look like this: {dateTime::yyyy-MM-dd HH:mm:ssZ::GMT+02}.
Sample output for this placeholder: 2007-12-24 23:59:59+0200.