You can apply text and image watermarks to new photos taken with the Survey123 field app camera. Watermarks cannot be applied to existing photos on the device.
This functionality is not available in the Survey123 web app.
The watermark parameter entered in the bind::esri:parameters column controls where the watermark will appear. The accepted parameters are as follows:
For example, watermark="@[latitude longitude:dms]" will print the latitude and longitude in the lower right corner of the image, while topLeftWatermark="@[latitude longitude:dms]" will print the same values in the upper left corner.
Multiple parameters can be used in one statement to add multiple watermarks to the same image.
Watermark contents and formatting
Watermark parameters can be used with a combination of properties to help define the contents and the formatting of the watermark.
If your combination of properties includes a space anywhere within it, enclose everything after the watermark parameter with double quotation marks.
Additionally, you can't reference the value from another field as a component of a greater watermark statement. Instead, you need to extract the desired value in another question, and construct the body of the watermark statement in the calculation column of the same question, including all variables. This value can then be referenced in the bind::esri:parameters column of the image question. Refer to the watermark sample survey available in Survey123 Connect for an example. Be aware that a calculated watermark statement like this doesn't need double quotation marks.
The following table lists all watermark parameter properties:
Free text input, with \n used to denote a line break. This property is implicit if text is provided as the first parameter, and does not need to be defined.
Color of the watermark text. This accepts either a hex value or a standard color name. If not provided, this defaults to blue.
Color outlining the text. This accepts either a hex value or a standard color name. If not provided, this defaults to the same color as the text.
Outline of the text in pixels. If not provided, this defaults to 1.
Color of the halo surrounding the watermark. This accepts either a hex value or a standard color name. If not provided, this defaults to a contrasting color.
Text size in pixels.
Name of the font to use. If not provided, this defaults to the field app's font.
Be aware that not every font is available on every device. Review the watermarks produced by your preferred devices to ensure that your watermark appears as intended.
Boolean value. When set to true, the watermark's font is bold.
Boolean value. When set to true, the watermark's font is italicized.
Margin from the edge of the image in pixels.
An image to act as a watermark instead of text. This requires the file name of an image in the survey's media folder.
Size of the watermark image in pixels. If not provided, the source image size will be used.
Images in watermarks will be justified to the space provided, regardless of other parameters or text provided in the watermark statement.
Consider using the image size options in the Survey123 Connect Settings tab for your survey if you're using an image as a watermark. This will affect the quality of both your photo and watermark.
Location and time
A common use case for watermarks is to display the location that a photo was taken. This can be formatted in a number of ways.
When taking a photo where capturing location is important, remember to wait for the location icon in the upper right corner of the screen to stop spinning. This indicates that the location has been obtained. If the location is not obtained, your location readings will be blank.
By default, using the @[latitude] and @[longitude] placeholders displays the location the photo was taken in decimal degrees. The following example would place these on separate lines:
watermark="Lat @[latitude]\nLon @[longitude]"
You can also use the placeholders @[latitude longitude] or @[longitude latitude] to display both values at once.
Different formats for longitude and latitude can be used by declaring them, separated with a colon, within the placeholders:
- @[longitude:ddm] for degree decimal minutes
- @[latitude:dms] for degrees/minutes/seconds
Additional placeholders can be used to display further information, or to use an entirely different coordinate system:
- @[mgrs]—Military Grid Reference System
- @[usng]—United States National Grid
- @[utm]—Universal Transverse Mercator
- @[direction]—The direction the device was traveling when the photo was taken
- @[accuracy] or @[horizontalAccuracy]
- @[compass]—Compass bearing
Watermarks are also capable of displaying the date and time that the photo was taken in the same way. The placeholders @[date], @[time], and @[dateTime] will return a time value from the device clock. In addition, the @[timestamp] placeholder can be used to instead display a time obtained from the location sensor; however, remember that when using this placeholder, you should ensure that the photo is obtaining a location.
Different formats can be used for date and time, using the same syntax as latitude and longitude. There are two acceptable formats:
- @[dateTime] or @[dateTime:long] will return a result similar to Monday, 22 April 2019 5:02:11 PM.
- @[dateTime:short] will return a result similar to 22/04/2019 5:02 PM.
It's also possible to implement your own formatting for date and time values by instead following a colon with a custom date format. The formatting used for these date formats is different from the XForm standard, instead using the Qt standard formatting. For example, a placeholder such as @[datetime:d MMM yyyy HH:mm] will return a result similar to 22 April 2019 17:02.
Limitations when using watermarks are as follows:
- Watermarks are not supported for images using the annotate appearance.
- Reverse geocoding is not supported in watermarks.
- On iOS, the Unrestricted image size doesn't support watermarks. The image will be scaled down to 1920 pixels on the longest edge.