"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.
 
 
 
 
 
 

2.1 KiB

About general function
======================

The checkit-tool validates a TIFF-file against a set of rules (see below). The
set of rules works as a whitelist. This means that if a tag in the TIFF file is
not explicitely checked by rules (independently if successfully or not) the tag
is not allowed. In cases where a rule is executed only if a predicate is set,
the tag is only allowed if the predicate succeeded.


Developers
==========
to configure the grammar you could use the PEG-extension for gvim from https://github.com/gf3/peg.vim

Users
=====
to define your own config-file to check TIFFs, please use this simplified
syntax:

* each line is either a tagline, a comment or empty
* a comment starts with # first
* a tagline is built via "TAG ; REQUIREMENTS ; VALUES", where
* a TAG is a increasing number similar to TIFF-Tag numbers (see TIFF
definition)
* REQUIREMENTS could be
** "mandatory" - a tag must exist in TIFF
** "optional" - a tag could exist in TIFF, if so it will be checked
** "depends(REFERENCE)" - a tag must exist in TIFF if reference exists
** "optdepends(REFERENCE)" - a tag could exists in TIFF if reference exists. If it exists it will be checked
* REFERENCE will be TAGREFERENCE.VALUEREFERENCE
** TAGREFERENCE points to a tag number which must be exists,
** VALUEREFERENCE could be 'any' or a decimal value or a string enclosed in '"'
** only if REFERENCE exists in TIFF the REQUIREMENTS rule will be checked
* VALUES could be one of these:
** "range(START, END)" where START and END are decimal values
** "logical_or( VALUELIST)" where VALUELIST are comma-separated decimale values
** "any" which means any match
** "only(VALUE) where VALUE is a decimal value or a string enclosed in ""
** "regex("REGEX") where REGEX is a PCRE-regular expression 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 defined per tag, they will be combined alternatively.

For examples check the example_configs/ - directory.

Values
======

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