"checkit_tiff" is an incredibly fast conformance checker for baseline TIFFs (with various extensions), see http://andreas-romeyke.de
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
About general function
The checkit-tool validates TIFF-files against a set of rules (see below). The
set of rules works as a whitelist. This means that TIFF tags that are used in
the file but not explicitely checked by a specific rule (not considering if
successful or not) are not allowed. In cases where a rule is executed only
if a predicate is set, the tag is only allowed if the predicate check succeeded.
to configure the grammar you could use the PEG-extension for gvim from
To define your own config-file for checking TIFFs, please use this simplified
* Each line is either a "modeline", an "include" line, a "tag" line, a comment or empty
* TODO: a modeline uses "mode(MODE)", MODE could be:
** "baseline", if no modeline is defined, it defaults to "mode(baseline)", too
* To include a configfile, use "include(FILENAME)", where FILENAME is a correct path
* Comments starts with '# '. They are only allowed to start right at the beginning of a new line.
* A tagline is built as "TAG; REQUIREMENTS; VALUES", where
* a TAG is an increasing number similar to TIFF-Tag numbers (see TIFF specification)
* REQUIREMENTS could be
** 'mandatory' - a tag must exist in TIFF
** 'optional' - a tag may exist in TIFF, if it does, it will be checked
** 'depends(REFERENCE)' - a tag must exist in TIFF if reference exists
** 'optdepends(REFERENCE)' - a tag may exists in TIFF if reference exists. If it exists it will be checked
* The syntax for a REFERENCE is TAGREFERENCE.VALUEREFERENCE
** TAGREFERENCE points to a tag number which must be exist,
** VALUEREFERENCE can be one of:
*** 'any' (which means any match) or
*** a decimal value or
*** 'greater_than(VALUE)', where VALUE is a decimal value or
*** 'less_than(VALUE)', where VALUE is a decimal value or
*** 'regex("REGEX")', where REGEX is a Perl compatible regular expression (PCRE) with escaped '"' and '\'. It only works with tags of type ascii
** only if REFERENCE exists in TIFF the REQUIREMENTS rule will be checked
** The REQUIREMENTS rule will only be checked if REFERENCE exists in the TIF
* VALUES can be one of:
** 'range(START, END)', where START and END are decimal values
** 'logical_or( VALUELIST)', where VALUELIST are comma-separated decimale values or ntupels
** 'any', which means any match
** 'only(VALUE)', where VALUE is a decimal value
** 'ntupel(VALUE, ..), decimal values as n-tupel enclosed in brackets
** 'regex("REGEX")', where REGEX is a Perl compatible regular expression (PCRE) with escaped '"' and '\', it only works with tags of type ascii
* each tagline or comment must be closed with a new line
If multiple rules are defined per tag, they will be combined.
For examples, please check the 'example_configs/' - directory.
At the moment, the parser only supports a limited type of values. To make
handling easier, it uses only the value/offset part of an IFD entry.