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

189 lines
8.6 KiB

# This defines a sample config for baseline tiffs, based on Whitepaper of the
# TI-A initiative (2016-05), see http://www.ti-a.org/TI-A%20Whitepaper.pdf
# tag; required; values
#
# works as whitelist
# * tag: any tag number in TIFF
# * required: mandatory | optional | depends( $tag.$value ) | optdepends( $tag.$value )
# * values: range($start, $end) | logical_or( $a, …) | only($a) |any
# Remember, because it works as whitelist for each required tag we need an
# entry here
#####
# Required Baseline Tags
#####
# 256 0100 ImageWidth The number of columns in the image, i.e., the number of pixels per row.
256; mandatory; range(1, 4294967295)
# 257 0101 ImageLength The number of rows of pixels in the image.
257; mandatory; range(1, 4294967295)
# 258 0102 BitsPerSample Number of bits per component.
##########################258; mandatory; logical_or(8,16)
# Bitonal is optional, grey & RGB is mandatory. If 262 AND 258 exist, then the values need to be in the specified range.
258; depends(262.2); only(8,8,8)
#258; depends(262.2); only(16,16,16) # needs to be fixed in parser
258; depends(258.any); logical_or(4, 8)
# 259 0103 Compression Compression scheme used on the image data
### (1 means no compression)
259; mandatory; only(1)
# 262 0106 PhotometricInterpretation The color space of the image data.
### 2 means RGB, 0 and 1 means bilevel or grayscale, 0 is unusual, 3 is Palette Color (FORBIDDEN), 4 is Transparency Mask (FORBIDDEN)
262; mandatory; range(1, 2)
# 273 0111 StripOffsets For each strip, the byte offset of that strip.
273; mandatory; any
# 277 0115 SamplesPerPixel The number of components per pixel.
### if RGB then 3 else 1
### Even though Baseline TIFF allows for SamplesPerPixel>3, we do NOT allow this for long term archival.
277; depends(262.2); only(3)
277; depends(262.1); only(1)
# 278 0116 RowsPerStrip The number of rows per strip.
278; mandatory; range(1, 4294967295)
# 279 0117 StripByteCounts For each strip, the number of bytes in the strip after compression.
279; mandatory; range(1, 4294967295)
# 282 011A XResolution The number of pixels per ResolutionUnit in the ImageWidth direction.
282; depends(296.any); range(300, 1200)
# 283 011B YResolution The number of pixels per ResolutionUnit in the ImageLength direction.
283; depends(206.any); range(300, 1200)
# 296 0128 ResolutionUnit The unit of measurement for XResolution and YResolution. 1 = No absolute unit of measurement. 2 = Inch. 3 = Centimeter. Default: 2
296; optional; any
#####
# optional fields
#####
# NO OTHER VALUES FROM THE RANGE (0 - 7) ARE ALLOWED. ONLY "0" IS SUITABLE FOR LONG TERM ARCHIVAL.
# 254 00FE NewSubfileType A general indication of the kind of data contained in this subfile. These values are defined as bit flags because they are independent of each other. Default is 0.
#254; optional; only(0)
# DO NOT UNCOMMENT! THIS TAG IS DEPRECATED! USE NEW SUBFILE TYPE INSTEAD!
# 255 00FF SubfileType A general indication of the kind of data contained in this subfile. This field is deprecated. The NewSubfileType field should be used instead.
#255; optional; range(1, 3)
# DO NOT UNCOMMENT! THRESHOLDING IS NOT SUITABLE FOR LONG TERM ARCHIVAL!
# 263 0107 Threshholding For black and white TIFF files that represent shades of gray, the technique used to convert from gray to black and white pixels. Default is 1.
#263; optional; range(1, 3)
# DO NOT UNCOMMENT! CELL WIDTH IS NOT SUITABLE FOR LONG TERM ARCHIVAL!
# 264 0108 CellWidth The width of the dithering or halftoning matrix used to create a dithered or halftoned bilevel file.
#264; depends(263.2); any
# DO NOT UNCOMMENT! CELL LENGTH IS NOT SUITABLE FOR LONG TERM ARCHIVAL!
# 265 0109 CellLength The length of the dithering or halftoning matrix used to create a dithered or halftoned bilevel file. This field should only be present if Threshholding = 2.
#265; depends(263.2); any
### Support for FillOrder=2 is not required in a Baseline TIFF compliant reader. Default is 1.
# 266 010A FillOrder The logical order of bits within a byte.
#266; optional; only(1)
# 270 010E ImageDescription A string that describes the subject of the image.
#270; optional; regex("^[[:print:]]*$")
# 271 010F Make The scanner manufacturer.
#271; optional; regex("^[[:print:]]*$")
# 272 0110 Model The scanner model name or number.
#272; optional; regex("^[[:print:]]*$")
# 274 0112 Orientation The orientation of the image with respect to the rows and columns. Default is 1, and only this value is Baseline TIFF conform.
# 274; optional; range(1, 8) # THIS IS NOT BASELINE TIFF!!! DO NOT UNCOMMENT!!!
#274; optional; only(1)
# 280 0118 MinSampleValue The minimum component value used. Default is 0.
#280; optional; any
# 281 0119 MaxSampleValue The maximum component value used; only for statistical purposes. Default is 2**(BitsPerSample) - 1.
#281; optional; any
# 284 011C PlanarConfiguration How the components of each pixel are stored. 1 = Chunky format. 2 = Planar format and Baseline TIFF readers are not required to support it. Default: 1.
#284; optional; only(1)
# DO NOT UNCOMMENT! FREE OFFSETS ARE NOT SUITABLE FOR LONG TERM ARCHIVAL!
# 288 0120 FreeOffsets For each string of contiguous unused bytes in a TIFF file, the byte offset of the string. Not recommended for general interchange.
#288; optional; any
# DO NOT UNCOMMENT! FREE BYTE COUNTS ARE NOT SUITABLE FOR LONG TERM ARCHIVAL!
# 289 0121 FreeByteCounts For each string of contiguous unused bytes in a TIFF file, the number of bytes in the string. Not recommended for general interchange.
#289; optional; any
# 290 0122 GrayResponseUnit The precision of the information contained in the GrayResponseCurve. Default: 2; Recommended: 3
#290; optdepends(262.0); range(1, 5)
#290; optdepends(262.1); range(1, 5)
# 291 0123 GrayResponseCurve For grayscale data, the optical density of each possible pixel value.
291; optdepends(262.0); any
291; optdepends(262.1); any
# 297 PageNumber actual page, and total pagecount, the actual page count starts with 0; Recommended: 0, 1
#297; optional; only(0,1)
# 305 0131 Software Name and version number of the software package(s) used to create the image.
#305; optional; regex("^[[:print:]]*$")
# 306 0132 DateTime Date and time of image creation in the format "YYYY:MM:DD HH:MM:SS".
306; optional; regex("^[12][901][0-9][0-9]:[01][0-9]:[0-3][0-9] [012][0-9]:[0-5][0-9]:[0-6][0-9]$")
# DO NOT UNCOMMENT! ARTIST IS NOT SUITABLE FOR LONG TERM ARCHIVAL DUE TO PRIVACY CONCERNS!
# 315 013B Artist Person who created the image. Some older TIFF files used this tag for storing Copyright information.
#315; optional; any
# DO NOT UNCOMMENT! HOST COMPUTER INFORMATION IS NOT SUITABLE AND IRRELEVANT FOR LONG TERM ARCHIVAL!
# 316 013C HostComputer The computer and/or operating system in use at the time of image creation.
#316; optional; any
# DO NOT UNCOMMENT! COLOR MAP TIFFS ARE NOT SUITABLE FOR LONG TERM ARCHIVAL!
# 320 0140 ColorMap This field defines a Red-Green-Blue color map (often called a lookup table) for palette color images.
#320; optional; any
# DO NOT UNCOMMENT! EXTRA SAMPLES TIFFS ARE NOT SUITABLE FOR LONG TERM ARCHIVAL BECAUSE THEIR MEANING CANNOT BE DOCUMENTED!
# 338 0152 ExtraSamples Description of extra components.
#338; optional; range(0-2)
# 700 02BC XMP XML packet containing XMP metadata.
#700; optional; any
# 33432 8298 Copyright Complete copyright notice of the person or organization that claims the copyright to the image.
33432; optional; regex("^[[:print:]]*$")
# IPTC METADATA ARE NOT SUITABLE FOR LONG TERM ARCHIVAL, but could be ignored
# 33723 83BB IPTC IPTC (International Press Telecommunications Council) metadata.
33723; optional; any
# PHOTOSHOP METADATA ARE PROPRIETARY AND HENCE NOT SUITABLE FOR LONG TERM ARCHIVAL, but could be ignored
# 34377 8649 Photoshop Collection of Photoshop 'Image Resource Blocks'.
34377; optional; any
# 34665 8769 Exif IFD A pointer to the Exif IFD. Exif IFD is a set of tags for recording Exif-specific attribute information. It is pointed to by the offset from the TIFF header (Value Offset) indicated by an Exif private tag value. An Exif IFD has the same structure as that of the IFD specified in TIFF. Ordinarily, however, it does not contain image data as in the case of TIFF.
34665; optional; any
# 34675 8773 ICC Profile ICC Profile data
34675; optional; any
#####
# unanswered questions
#####
# - Image File Directory (IFD)
# => genau 1 IFD muss vorhanden sein
# (einerseits min. 1. gefordert, andererseits muss ein Baseline-Tiff-Reader max. 1 lesen)
# => Einträge müssen aufsteigend geordnet sein
# - Bytes 0-1: Anzahl der IFD-Einträge
# => muss mit der tatsächlichen Anzahl übereinstimmen
# - 4 Bytes: Offset zum nächsten IFD (oder "0000" falls kein IFD mehr kommt)
# => Eintrag muss "0000" sein