Introduction to Text Variables

In ImageMeter, you can define some texts yourself, for example the titles for new images and folders, image notes, or the image titles in the PDF output. These could be simple, fixes names like "New folder", but in most cases, you probably want to have dynamic parts in the name, like the current date or the filename of the loaded image. Text variables make this possible as they are replaced in each case by the current value.

Text variables are written within curly braces '{ }'. Everything outside of these parentheses is normal, verbatim text. For example, to insert the current date, you can use the text variable '{now}'. The title definition would then read like this:

  Image from {now}

When inserting an image, '{now}' will be automatically replaced with the current date. Hence, the title will be like this:

  Image from 23/Apr/2021

Variables can contain sub-variables. These can be used, for example, to access specific parts of a date (year, month, day, time). The sub-variable is appended to the variable, separated by a dot '.' like this:

    Image from the year {now.yyyy}

This is produce a title of this form:

    Image from the year 2021

Which sub-variables are allowed is listed in the section `Reference` further down on this page. You can also write chains of several sub-variables if the sub-variables have sub-variables themselves:

    Latitude: {image.exif.gps.latitude}

Some variables (e.g., 'exif', 'image', or 'folder') have no sensible output themselves, but only through their sub-variables. For example, '{exif}' does not produce sensible output, but '{exif.gps}' does.

List of Variables

The following list shows the variables possible in a text expression:

NameTypeDescription
nowdateThe current date (not necessarily the image capturing date).
filenamefilenameFilename of the input file
pageinteger numberImported PDF page number
exifEXIFEXIF data of the image
folderfolderThe current folder
imageimageThe current image

Note that not all variables are allowed in all places as they might not make always make sense. For example, when defining the text for new folders, there is no input filename and thus no '{filename}' variable. If you are using an invalid variable name or if a variable is not defined for some reason (e.g. the input image has no EXIF data), the text 'undefined' will be written at its place.

Reference

The following tables show the sub-variables available for each variable type and the output of the variable itself. The elementary data types (text, number) have no sub-variables.

Image

Output: image title. I.e. the same as {*.title}

Sub-variableTypeDescription
titletextImage title
parentfolderFolder in which the image is located
numberinteger numberThe assigned image number
exifEXIFThe EXIF data of the image
capture_datedateCapture date, independent from the EXIF data

Folder

Output: folder title. I.e. the same as {*.title}

Sub-variableTypeDescription
titletextFolder title
parentfolderThe parent folder

Filename

Output: full filename with suffix

Sub-variableTypeDescription
stemtextFilename without suffix
suffixtextThe suffix of the filename

Exif

Output: undefined

Sub-variableTypeDescription
gpsGPSGPS coordinate where the image was captured
datedateCapture date
maketextCamera manufacturer
modeltextCamera model

GPS

Output: coordinates consisting of latitude and longitude, but no height.

Sub-variableTypeDescription
latitudetextLatitude (N/S direction)
longitudetextLongitude (O/W direction)
altitudetextAltitude in meters (above sea level)

Date

Output: date without time. For example: "23/Apr/2021".

Sub-variableTypeDescription
yyyytextYear (4 digits)
yytextYear (last 2 digits)
minteger numberMonth as number
mmtextMonat as 2-digit number
MtextMonat as abbreviation
MMtextMonat as full name
dinteger numberDay
ddtextDay as 2-digit number
hinteger numberHour
hhtextHour as 2-digit number
h12textHour (12 hours + am/pm)
mintextMinutes as 2-digit number
sectextSeconds as 2-digit number
timetextFull time in HH:MM:SS format
hhmmtextTime in HH:MM format

Integer number

Output: the number.

Sub-variableTypeDescription
2textOutput as 2-digit number
3textOutput as 3-digit number
4textOutput as 4-digit number

Further notes

If you would like to use curly braces '{ }' in your output, you have to precede them with a backslash '\'. This is also needed if you want to write a '\' itself.

Spaces are not allowed in a variable expression. The text input of Android often inserts a space automatically after a dot. Make sure to remove those spaces.