All Downloads are FREE. Search and download functionalities are using the official Maven repository.

implementationcheckers.TiffITProfileChecker.xml Maven / Gradle / Ivy

There is a newer version: 1.2.8
Show newest version
<?xml version="1.0" encoding="UTF-8"?>
<implementationCheckerObject xmlns="http://www.dpfmanager.org/ProfileChecker"
                             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                             xsi:schemaLocation="http://www.dpfmanager.org/ProfileChecker ProfileChecker.xsd">

    <title>TIFF/IT</title>
    <iso>TIFF/IT</iso>
    <description>ISO 12639:2004(E)</description>
    <version>1.0.0</version>
    <author>Easy Innova</author>
    <date>2016-09-20</date>

    <include><policyChecker>TIFF_Baseline_Core_6_0.xml</policyChecker>
        <excluderules>IFDE-0001</excluderules>
        <excluderules>TAG-296-0005</excluderules>
        <excluderules>TAG-254-0003</excluderules>
        <excluderules>TAG-259-0003</excluderules>
        <excluderules>TAG-284-0003</excluderules>
        <excluderules>TAG-284-0004</excluderules>
        <excluderules>TAG-262-0003</excluderules>

    </include>

    <rules id="IFDE-0">
        <title>Validation rules for the TIFF Image File Directory Entry(IFD)</title>
        <description>Each 12-byte IFD entry has the following format:

            Bytes 0-1 The Tag that identifies the field.
            Bytes 2-3 The field Type.
            Bytes 4-7 The number of values, Count of the indicated Type.
            Bytes 8-11 The Value Offset, the file offset (in bytes) of the Value for the field.

            The Value is expected to begin on a word boundary; the corresponding Value Offset will thus be an even number.
            This file offset may point anywhere in the file, even after the image data.</description>

        <rule id="IFDE-0001-1" context="ifd" level="error" experimental="true">
            <title>invalid IFDE type</title>
            <description>The field types and their sizes are:

                1 = BYTE 8-bit unsigned integer.
                2 = ASCII 8-bit byte that contains a 7-bit ASCII code; the last byte must be NUL (binary zero).
                3 = SHORT 16-bit (2-byte) unsigned integer.
                4 = LONG 32-bit (4-byte) unsigned integer.
                5 = RATIONAL Two LONGs: the first represents the numerator of a fraction; the second, the denominator.
                7 = UNDEFINED An 8-bit byte that may contain anything, depending on the definition of the field.

                To store a complicated data structure in a private tag, use the UNDEFINED field type and set the Count to the number of bytes required to hold the data structure.</description>
            <reference><section>Section 7.5.1: IFD entry</section><pages>9</pages></reference>
            <assert test="{tagtype &gt; 0} &amp;&amp;  {tagtype &lt; 8}  &amp;&amp; {tagtype != 6}">Invalid TIFF type, this type is not defined in the TIFF/IT specification</assert>
        </rule>
    </rules>

    <rules id="TAG-269">
        <title>DocumentName</title>
        <description>The name of the document from which this image was scanned.

            Tag = 269 (10D.H)
            Type = ASCII
            No default</description>

        <rule id="TAG-269-0001" context="tag[id=269]" level="error">
            <title>DocumentName tag valid Type</title>
            <description>DocumentName Tag type must be ASCII</description>
            <reference><document>TIFF 6.0 Specification. Part 2: Extended TIFF</document><section>Section 12: Document Storage and Retrieval</section><page>55</page></reference>
            <assert test="{type=='ASCII'}">DocumentName Tag type is not valid, an ASCII type is expected</assert>
        </rule>
    </rules>
    <rules id="TAG-285">
        <title>PageName</title>
        <description>The name of the page from which this image was scanned.

            Tag = 285 (11D.H)
            Type = ASCII
            No default</description>

        <rule id="TAG-285-0001" context="tag[id=285]" level="error">
            <title>PageName tag valid Type</title>
            <description>PageName Tag type must be ASCII</description>
            <reference><document>TIFF 6.0 Specification. Part 2: Extended TIFF</document><section>Section 12: Document Storage and Retrieval</section><page>55</page></reference>
            <assert test="{type=='ASCII'}">PageName Tag type is not valid, an ASCII type is expected</assert>
        </rule>
    </rules>

    <rules id="TAG-34016">
        <title>Site</title>
        <description>Site name.

            Tag = 34016 (84E0.H)
            Type = ASCII
            No default</description>

        <rule id="TAG-34016-0001" context="tag[id=34016]" level="error">
            <title>Site tag valid Type</title>
            <description>Site Tag type must be ASCII</description>
            <reference><section>Section 7.2.3: System identification</section><page>11</page></reference>
            <assert test="{type=='ASCII'}">Site Tag type is not valid, an ASCII type is expected</assert>
        </rule>
    </rules>

    <rules id="TAG-34018">
        <title>IT8Header</title>
        <description>Unmodified headers appended by ASCII “null” from ISO 10755, ISO 10756, and ISO 10759.

            Tag = 34016 (84E2.H)
            Type = ASCII
            No default</description>

        <rule id="TAG-34018-0001" context="tag[id=34018]" level="error">
            <title>IT8Header tag valid Type</title>
            <description>IT8Header Tag type must be ASCII</description>
            <reference><section>Section 7.2.3: System identification</section><page>11</page></reference>
            <assert test="{type=='ASCII'}">IT8Header Tag type is not valid, an ASCII type is expected</assert>
        </rule>

        <rule id="TAG-34018-0002" context="ifd[class=image]" level="warning">
            <title>IT8Header obsolete</title>
            <description>The IT8Header field provides the ability to include unmodified headers (appended by an ASCII “null” at the end of the character string) from ISO 10755, ISO 10756, and ISO 10759 in the TIFF/IT files.
                TIFF/IT readers are not required to interpret and use the contents of the IT8Header field.
                The use of the IT8Header tag is only recommended for compatibility with readers based on the 1998 edition of this International Standard:ISO 12639-1998. International Standards ISO 10755, ISO 10756, and ISO 10759 are obsolete and have been withdrawn.</description>
            <reference><section>Section 7.2.3: System identification</section><page>11</page></reference>
            <assert test="{tags.tag[name=IT8Header]}">The use of the IT8Header tag is only recommended for compatibility with ISO 12639-1998. ISO 10755, ISO 10756, and ISO 10759 are obsolete.</assert>
        </rule>
    </rules>

    <rules id="TAG-274-1">
        <title>Orientation</title>
        <description>The orientation of the image with respect to the rows and columns.
            Tag = 274 (112.H)
            Type = SHORT
            N = 1
            Default is 1.

            Basic orientations:
            1 = The 0th row represents the visual top of the image, and the 0th column represents the visual left-hand side.
            4 = The 0th row represents the visual bottom of the image, and the 0th column represents the visual left-hand side.
            5 = The 0th row represents the visual left-hand side of the image, and the 0th column represents the visual top.
            8 = The 0th row represents the visual left-hand side of the image, and the 0th column represents the visual bottom.

            Optional orientations:
            2 = The 0th row represents the visual top of the image, and the 0th column representsthe visual right-hand side.
            3 = The 0th row represents the visual bottom of the image, and the 0th column representsthe visual right-hand side.
            6 = The 0th row represents the visual right-hand side of the image, and the 0th column represents the visual top.
            7 = The 0th row represents the visual right-hand side of the image, and the 0th columnrepresents the visual bottom.

            Support for orientations other than 1 is not a Baseline TIFF requirement.</description>
        <rule id="TAG-274-1-0007" context="ifd[class=image]" level="warning">
            <title>Orientation recommended values</title>
            <description>Orientation basic values are:

                1 = The 0th row represents the visual top of the image, and the 0th column represents the visual left-hand side.
                4 = The 0th row represents the visual bottom of the image, and the 0th column represents the visual left-hand side.
                5 = The 0th row represents the visual left-hand side of the image, and the 0th column represents the visual top.
                8 = The 0th row represents the visual left-hand side of the image, and the 0th column represents the visual bottom.
                Default is 1.</description>
            <reference><section>Section 8: Baseline Field Reference Guide</section><page>36</page></reference>
            <assert test="{tags.tag[name=Orientation] != 1} &amp;&amp; {tags.tag[name=Orientation] != 4} &amp;&amp; {tags.tag[name=Orientation] != 5} &amp;&amp; {tags.tag[name=Orientation] != 8}">Orientation value is valid but not recommended, use a basic Orientation value instead</assert>
        </rule>
    </rules>

    <rules id="TAG-286">
        <title>XPosition</title>
        <description>X position of the image. The X offset in ResolutionUnits of the left side of the image, with respect to the left side of the page.

            Tag = 286 (11E.H)
            Type = RATIONAL
            N = 1
            No default</description>
        <rule id="TAG-286-1-0001" context="tag[id=286]" level="error">
            <title>XPosition tag valid Type</title>
            <description>XPosition Tag type must be RATIONAL</description>
            <reference><section>Section 7.2.4: Image size and orientation</section><page>12</page></reference>
            <assert test="{type=='RATIONAL'}">XPosition Tag type is not valid, an RATIONAL type is expected</assert>
        </rule>

        <rule id="TAG-286-1-0002" context="tag[id=286]" level="error">
            <title>XPosition valid cardinality</title>
            <description>The cardinality of the XPosition tag must greater than 0</description>
            <reference><section>Section 7.2.4: Image size and orientation</section><page>12</page></reference>
            <assert test="{cardinality &gt; 0}">XPosition cardinality is not valid, cardinality should be greater than 0</assert>
        </rule>
        <rule id="TAG-286-1-0003" context="ifd[class=image]" level="error">
            <title>XPosition invalid location</title>
            <description>XPosition should only be used within a FP file</description>
            <reference><section>Section 7.10.2.2: FP file structure</section><page>46</page></reference>
            <assert test="{!tags.tag[name=XPosition]} || {filetype=='fp'}">XPosition should only be used within a FP file</assert>
        </rule>
        <rule id="TAG-286-1-0004" context="ifd[filetype=fp]" level="error">
            <title>XPosition match YPosition</title>
            <description>The cardinality of the XPosition tag must match YPosition cardinality</description>
            <reference><section>Section 7.10.2.2: FP file structure</section><page>46</page></reference>
            <assert test="{tags.tag[name=XPosition].cardinality == tags.tag[name=YPosition].cardinality}">XPosition cardinality is not valid, cardinality must match YPosition cardinality</assert>
        </rule>
        <rule id="TAG-286-1-0005" context="ifd[filetype=fp]" level="warning">
            <title>XPosition default value</title>
            <description>If the XPosition and YPosition fields are not included for a component, the component is assumed to be positioned at the top left corner of the page.</description>
            <reference><section>Section 12: Document Storage and Retrieval</section><page>55</page></reference>
            <assert test="{!tags.tag[name=YPosition]}">If the XPosition field is not included for a component, the component is assumed to be positioned at the top left corner of the page. value 1</assert>
        </rule>
    </rules>

    <rules id="TAG-287-1">
        <title>YPosition</title>
        <description>Y position of the image. The Y offset in ResolutionUnits of the top of the image, with respect to the top of the page. In the TIFF coordinate scheme, the positive Y direction is down, so that YPosition is always positive.

            Tag = 287 (11F.H)
            Type = RATIONAL
            N = 1
            No default</description>

        <rule id="TAG-287-1-0001" context="tag[id=287]" level="error">
            <title>YPosition tag valid Type</title>
            <description>YPosition Tag type must be RATIONAL</description>
            <reference><section>Section 7.2.4: Image size and orientation</section><page>12</page></reference>
            <assert test="{type=='RATIONAL'}">YPosition Tag type is not valid, an RATIONAL type is expected</assert>
        </rule>

        <rule id="TAG-287-1-0002" context="tag[id=287]" level="error">
            <title>YPosition valid cardinality</title>
            <description>The cardinality of the YPosition tag must greater than 0</description>
            <reference><section>Section 7.2.4: Image size and orientation</section><page>12</page></reference>
            <assert test="{cardinality &gt; 0}">YPosition cardinality is not valid, cardinality should be greater than 0</assert>
        </rule>
        <rule id="TAG-287-1-0003" context="ifd[class=image]" level="error">
            <title>YPosition invalid location</title>
            <description>YPosition should only be used within a FP file</description>
            <reference><section>Section 7.10.2.2: FP file structure</section><page>46</page></reference>
            <assert test="{!tags.tag[name=YPosition]} || {filetype=='fp'}">YPosition should only be used within a FP file</assert>
        </rule>
        <rule id="TAG-287-1-0004" context="ifd[filetype=fp]" level="error">
            <title>YPosition match XPosition</title>
            <description>The cardinality of the YPosition tag must match XPosition cardinality</description>
            <reference><section>Section 7.10.2.2: FP file structure</section><page>46</page></reference>
            <assert test="{tags.tag[name=YPosition].cardinality == tags.tag[name=XPosition].cardinality}">YPosition cardinality is not valid, cardinality must match XPosition cardinality</assert>
        </rule>
        <rule id="TAG-287-1-0005" context="ifd[filetype=fp]" level="warning">
            <title>YPosition default value</title>
            <description>If the XPosition and YPosition fields are not included for a component, the component is assumed to be positioned at the top left corner of the page.</description>
            <reference><section>Section 12: Document Storage and Retrieval</section><page>55</page></reference>
            <assert test="{!tags.tag[name=YPosition]}">If the YPosition field is not included for a component, the component is assumed to be positioned at the top left corner of the page. value 1</assert>
        </rule>
    </rules>

    <rules id="TAG-296-1">
        <title>ResolutionUnit</title>
        <description>The unit of measurement for XResolution and YResolution.

            Tag = 296 (128.H)
            Type = SHORT
            N = 1
            Default is 2.

            Currently defined values are:
            2 = Inch.
            3 = Centimeter.</description>
        <rule id="TAG-296-1-0005" context="ifd[class=image]" level="error">
            <title>ResolutionUnit without absolute units</title>
            <description>ResolutionUnit (field 296) for TIFF/IT, TIFF/IT-P1 and TIFF/IT-P2 conformity levels shall contain the value 3 to indicate centimetres or the value 2 (default value) to indicate inches.
                The other value for  ResolutionUnit recognized by TIFF, but not by TIFF/IT, is 1, meaning no absolute unit of measurement is specified.</description>
            <reference><section>Section 7.2.5: Image resolution</section><page>13</page></reference>
            <assert test="{tags.tag[name=ResolutionUnit] != 1}">ResolutionUnit without absolute units, TIFF/IT do not support no absolute unit of measurement</assert>
        </rule>


    </rules>

    <rules id="TAG-254-1">
        <title>NewSubfileType</title>
        <description>A general indication of the kind of data contained in this subfile.
            Replaces the old SubfileType field, due to limitations in the definition of that field. NewSubfileType is mainly useful when there are multiple subfiles in a single TIFF file.
            This field is made up of a set of 32 flag bits. Unused bits are expected to be 0. Bit 0 is the low-order bit.

            Tag = 254 (FE.H)
            Type = LONG
            N = 1
            Default is 0.

            Currently defined values are:
            Bit 0 is 1 if the image is a reduced-resolution version of another image in this TIFF file; else the bit is 0.
            Bit 1 is 1 if the image is a single page of a multi-page image (see the PageNumber field description); else the bit is 0.
            Bit 2 is 1 if the image defines a transparency mask for another image in this TIFF file. The PhotometricInterpretation value must be 4, designating a transparency mask.
            Bit 3 is 1 if identify TIFF/IT-FP files.

            These values are defined as bit flags because they are independent of each other.</description>

        <rule id="TAG-254-1-0003" context="ifd[class=image]" level="error">
            <title>NewSubfileType valid value</title>
            <description>The value of the NewSubfileType tag must be between 0 and 16</description>
            <reference><section>Section 7.10.2.2: FP file structure</section><page>46</page></reference>
            <assert test="{tags.tag[name=NewSubfileType] &gt; -1} &amp;&amp; {tags.tag[name=NewSubfileType] &lt; 16}">NewSubfileType value is not valid,the value should be between 0 and 15 </assert>
        </rule>
    </rules>

    <rules id="TAG-259-1">
        <title>Compression</title>
        <description>Compression scheme used on the image data.

            Tag = 259 (103.H)
            Type = SHORT
            N = 1
            Default = 1

            Currently defined values are:
            1 = No compression
            4 = CCITT G4-encoding scheme
            7 = JPEG encoding scheme ('new-style' JPEG)
            8 = Deflate ('Adobe-style')
            32895 = the use of RasterPadding in the CT or MP format (IT8CTPAD)
            32896 = the run-length encoding scheme for the LW format (IT8LW)
            32897 = the run-length encoding scheme for the HC format (IT8MP)
            32898 = the run-length encoding scheme for the BL format (T8BL)</description>


        <rule id="TAG-259-1-0003" context="ifd" level="error">
            <title>Valid Compression value</title>
            <description>The Compression tag must have a valid value.
                1 = No compression
                4 = CCITT G4-encoding scheme
                7 = JPEG encoding scheme ('new-style' JPEG)
                8 = Deflate ('Adobe-style')
                32895 = the use of RasterPadding in the CT or MP format (IT8CTPAD)
                32896 = the run-length encoding scheme for the LW format (IT8LW)
                32897 = the run-length encoding scheme for the HC format (IT8MP)
                32898 = the run-length encoding scheme for the BL format (T8BL)
            </description>
            <reference><section>Section 8: Baseline Field Reference Guide</section><pages>30-31</pages></reference>
            <assert test="{tags.tag[name=Compression] == 1} || {tags.tag[name=Compression] == 4} || {tags.tag[name=Compression] == 7} || {tags.tag[name=Compression] == 8} || {tags.tag[name=Compression] == 32895} || {tags.tag[name=Compression] == 32896} || {tags.tag[name=Compression] == 32897} || {tags.tag[name=Compression] == 32898}">The Compression tag must have a valid value</assert>
        </rule>
    </rules>

    <rules id="TAG-284-1">
        <title>PlanarConfiguration</title>
        <description>How the components of each pixel are stored.

            Tag = 284 (11C.H)
            Type = SHORT
            N = 1
            Default is 1

            Currently defined values are:
            1 = pixel interleaved
            2 = colour interleaved
            32768 = line interleaved</description>

        <rule id="TAG-284-1-0003" context="ifd[class=image]" level="error">
            <title>PlanarConfiguration valid values</title>
            <description>The values of the PlanarConfiguration tag must be 1(Chunky) or 2(Planar)</description>
            <reference><section>Section 8: Baseline Field Reference Guide</section><page>38</page></reference>
            <assert test="{tags.tag[name=PlanarConfiguration] == 1} || {tags.tag[name=PlanarConfiguration]== 2} || {tags.tag[name=PlanarConfiguration]== 32768}">PlanarConfiguration value is not valid, value should be 1(Chunky) or 2(Planar)</assert>
        </rule>
    </rules>

    <rules id="TAG-34019">
        <title>RasterPadding</title>
        <description>The RasterPadding field allows each line of colour or interleaved colours to be padded to a 1-, 2-, 4-, 512-, or
            1 024-byte boundary.

            Tag = 34019 (84E3.H)
            Type = SHORT
            N = 1
            Value = VALUE (possible values listed below)
            Default 0

            valid values are:
            0 = byte raster (default value) pad to 1 byte
            1 = word raster pad to 2 bytes
            2 = long-word raster pad to 4 bytes
            9 = sector raster pad to 512 bytes
            10 = long sector raster pad to 1 024 bytes
        </description>

        <rule id="TAG-34019-0001" context="tag[id=34019]" level="error">
            <title>RasterPadding valid Type</title>
            <description>RasterPadding Tag type must be SHORT</description>
            <reference>
                <section>Section 7.2.6: Data format</section>
                <page>13</page>
            </reference>
            <assert test="{type=='SHORT'}">RasterPadding type is not valid, an SHORT type is expected</assert>
        </rule>

        <rule id="TAG-34019-0002" context="tag[id=34019]" level="error">
            <title>RasterPadding valid cardinality</title>
            <description>The cardinality of the RasterPadding tag must be 1</description>
            <reference>
                <section>Section 7.2.6: Data format</section>
                <page>13</page>
            </reference>
            <assert test="{cardinality==1}">RasterPadding must have a 1 cardinality</assert>
        </rule>

        <rule id="TAG-34019-0004" context="ifd[class=image]" level="error">
            <title>RasterPadding valid values</title>
            <description>RasterPadding valid values are:
                0 = byte raster (default value) pad to 1 byte
                1 = word raster pad to 2 bytes
                2 = long-word raster pad to 4 bytes
                9 = sector raster pad to 512 bytes
                10 = long sector raster pad to 1 024 bytes</description>
            <reference>
                <section>Section 7.2.6: Data format</section>
                <page>13</page>
            </reference>
            <assert test="{tags.tag[name=RasterPadding] == 0} || {tags.tag[name=RasterPadding] == 1} || {tags.tag[name=RasterPadding] == 2} || {tags.tag[name=RasterPadding] == 9} || {tags.tag[name=RasterPadding] == 10}">RasterPadding invalid value.</assert>
        </rule>

        <rule id="TAG-34019-0005" context="ifd[class=image]" level="info">
            <title>RasterPadding default value</title>
            <description>RasterPadding has a default value when it is not defined in a Colour continuous-tone pictures (CT) value 0 is assumed</description>
            <reference>
                <section>Section 7.2.6: Data format</section>
                <page>13</page>
            </reference>
            <assert test="{filetype=='ct'} &amp;&amp; {!tags.tag[name=RasterPadding]}">RasterPadding has a default value when it is not defined in a Colour continuous-tone pictures (CT) value 0 is assumed</assert>
        </rule>

        <rule id="TAG-34019-0006" context="ifd[class=image]" level="info">
            <title>RasterPadding default value</title>
            <description>RasterPadding has a default value when it is not defined in a Monochrome continuous-tone picture (MP) value 0 is assumed</description>
            <reference>
                <section>Section 7.2.6: Data format</section>
                <page>13</page>
            </reference>
            <assert test="{filetype=='mp'} &amp;&amp; {!tags.tag[name=RasterPadding]}">RasterPadding has a default value when it is not defined in a Colour continuous-tone pictures (CT) value 0 is assumed</assert>
        </rule>

        <rule id="TAG-34019-0007" context="ifd[class=image]" level="error">
            <title>RasterPadding only in CT and MP type</title>
            <description>RasterPadding should only be used in Colour continuous-tone pictures (CT)</description>
            <reference>
                <section>Section 7.2.6: Data format</section>
                <page>13</page>
            </reference>
            <assert test="{filetype=='ct'} || {filetype=='mp'} || {!tags.tag[name=RasterPadding]}">RasterPadding should only be used in Colour continuous-tone pictures.</assert>
        </rule>
    </rules>

    <rules id="TAG-34020">
        <title>BitsPerRunLength</title>

        <description>Number of bits for short run length encoding.

            Tag = 34020 (84E4.H)
            Type = SHORT
            N = 1
            Default 8

        </description>

        <rule id="TAG-34020-0001" context="tag[id=34020]" level="error">
            <title>BitsPerRunLength valid Type</title>
            <description>BitsPerRunLength Tag type must be SHORT</description>
            <reference>
                <section>Section 7.2.6: Data format</section>
                <page>14</page>
            </reference>
            <assert test="{type=='SHORT'}">BitsPerRunLength type is not valid, an SHORT type is expected</assert>
        </rule>

        <rule id="TAG-34020-0002" context="tag[id=34020]" level="error">
            <title>BitsPerRunLength valid cardinality</title>
            <description>The cardinality of the BitsPerRunLength tag must be 1</description>
            <reference>
                <section>Section 7.2.6: Data format</section>
                <page>14</page>
            </reference>
            <assert test="{cardinality==1}">BitsPerRunLength must have a 1 cardinality</assert>
        </rule>

        <rule id="TAG-34020-0003" context="ifd[class=image]" level="error">
            <title>BitsPerRunLength valid  only in LW file</title>
            <description>BitsPerRunLength should only be used in TIFF/IT-LW line-art files</description>
            <reference>
                <section>Section 7.2.6: Data format</section>
                <page>14</page>
            </reference>
            <assert test="{!tags.tag[name=BitsPerRunLength]} || {filetype=='lw'}">BitsPerRunLength should only be used in TIFF/IT-LW line-art files</assert>
        </rule>

        <rule id="TAG-34020-0004" context="ifd[filetype=lw]" level="info">
            <title>BitsPerRunLength default value</title>
            <description>BitsPerRunLength has a default value. if it not present default value 8 is assumed</description>
            <reference>
                <section>Section 7.2.6: Data format</section>
                <page>14</page>
            </reference>
            <assert test="{!tags.tag[name=BitsPerRunLength]}">BitsPerRunLength has a default value. if it not present default value 8 is assumed</assert>
        </rule>
    </rules>

    <rules id="TAG-34021">
        <title>BitsPerExtendedRunLength</title>

        <description>Number of bits for long run length encoding.

            Tag = 34021 (84E5.H)
            Type = SHORT
            N = 1
            Default 16

        </description>

        <rule id="TAG-34021-0001" context="tag[id=34021]" level="error">
            <title>BitsPerExtendedRunLength valid Type</title>
            <description>BitsPerExtendedRunLength Tag type must be SHORT</description>
            <reference>
                <section>Section 7.2.6: Data format</section>
                <page>14</page>
            </reference>
            <assert test="{type=='SHORT'}">BitsPerExtendedRunLength type is not valid, an SHORT type is expected</assert>
        </rule>

        <rule id="TAG-34021-0002" context="tag[id=34021]" level="error">
            <title>BitsPerExtendedRunLength valid cardinality</title>
            <description>The cardinality of the BitsPerExtendedRunLength tag must be 1</description>
            <reference>
                <section>Section 7.2.6: Data format</section>
                <page>14</page>
            </reference>
            <assert test="{cardinality==1}">BitsPerExtendedRunLength must have a 1 cardinality</assert>
        </rule>

        <rule id="TAG-34021-0003" context="ifd[class=image]" level="error">
            <title>BitsPerExtendedRunLength valid  only in LW file</title>
            <description>BitsPerExtendedRunLength should only be used in TIFF/IT-LW line-art files</description>
            <reference>
                <section>Section 7.2.6: Data format</section>
                <page>14</page>
            </reference>
            <assert test="{!tags.tag[name=BitsPerExtendedRunLength]} || {filetype=='lw'}">BitsPerExtendedRunLength should only be used in TIFF/IT-LW line-art files</assert>
        </rule>

        <rule id="TAG-34021-0004" context="ifd[filetype=lw]" level="info">
            <title>BitsPerExtendedRunLength default value</title>
            <description>BitsPerExtendedRunLength has a default value. if it not present default value 8 is assumed</description>
            <reference>
                <section>Section 7.2.6: Data format</section>
                <page>14</page>
            </reference>
            <assert test="{!tags.tag[name=BitsPerExtendedRunLength]}">BitsPerExtendedRunLength has a default value. if it not present default value 8 is assumed</assert>
        </rule>
    </rules>

    <rules id="TAG-34030">
        <title>HCUsage</title>
        <description>HCUsage indicate the type of information contained in the HC file.

            Tag = 34030 (84EE.H)
            Type = LONG
            N = 1
            Default 0

            bit 0  If 1 means the file contains high-resolution CT contone information
            bit 1  If 1 means the file contains line-art (line-work) information
            bit 2  If 1 means the file contains trapping information</description>

        <rule id="TAG-34030-0001" context="tag[id=34030]" level="error">
            <title>HCUsage valid Type</title>
            <description>HCUsage Tag type must be LONG</description>
            <reference>
                <section>Section 7.2.6: Data format</section>
                <page>14</page>
            </reference>
            <assert test="{type=='LONG'}">HCUsage type is not valid, an LONG type is expected</assert>
        </rule>

        <rule id="TAG-34030-0002" context="tag[id=34030]" level="error">
            <title>HCUsage valid cardinality</title>
            <description>The cardinality of the HCUsage tag must be 1</description>
            <reference>
                <section>Section 7.2.6: Data format</section>
                <page>14</page>
            </reference>
            <assert test="{cardinality==1}">HCUsage must have a 1 cardinality</assert>
        </rule>

        <rule id="TAG-34030-0003" context="ifd[class=image]" level="error">
            <title>HCUsage valid only in HC file</title>
            <description>HCUsage should only be used in TIFF/IT-HC files</description>
            <reference>
                <section>Section 7.2.6: Data format</section>
                <page>14</page>
            </reference>
            <assert test="{!tags.tag[name=HCUsage]} || {filetype=='hc'}">HCUsage should only be used in TIFF/IT-HC files</assert>
        </rule>

        <rule id="TAG-34030-0004" context="ifd[filetype=hc]" level="info">
            <title>HCUsage default value</title>
            <description>HCUsage has a default value. if it not present default value 0 is assumed</description>
            <reference>
                <section>Section 7.2.6: Data format</section>
                <page>14</page>
            </reference>
            <assert test="{!tags.tag[name=HCUsage]}">HCUsage has a default value. if it not present default value 0 is assumed</assert>
        </rule>
    </rules>

    <rules id="TAG-34031">
        <title>TrapIndicator</title>
        <description>The TrapIndicator field is optional and is used to indicate whether the file or file set has been trapped.
            Trapped means the modification of the boundaries of colour objects to prevent the media colour from accidentally
            showing through when colour planes are slightly misregistered in the reproduction process.

            Tag = 34031 (84EF.H)
            Type = BYTE
            N = 1
            Default 1

            valid values are:
            1  = file set includes any necessary trapping data and no further trapping is needed
            0  = no trapping modifications have been made to the file or file set. Any desired trapping must be done before final rendering.

            The value of TrapIndicator, if present, shall be “1” for SD files.
            In file types other than FP, the TrapIndicator indicates the presence of trapping internal to that single file.
            In an FP file set, the value of TrapIndicator indicates the status of trapping both within and between all subfiles.
            The value in the FP file shall be used and the value in the individual files shall be ignored.</description>

        <rule id="TAG-34031-0001" context="tag[id=34031]" level="error">
            <title>TrapIndicator valid Type</title>
            <description>TrapIndicator Tag type must be BYTE</description>
            <reference>
                <section>Section 7.2.6: Data format</section>
                <page>14</page>
            </reference>
            <assert test="{type=='BYTE'}">TrapIndicator type is not valid, an BYTE type is expected</assert>
        </rule>

        <rule id="TAG-34031-0002" context="tag[id=34031]" level="error">
            <title>TrapIndicator valid cardinality</title>
            <description>The cardinality of the TrapIndicator tag must be 1</description>
            <reference>
                <section>Section 7.2.6: Data format</section>
                <page>14</page>
            </reference>
            <assert test="{cardinality==1}">TrapIndicator must have a 1 cardinality</assert>
        </rule>

        <rule id="TAG-34031-0004" context="ifd[filetype=hc]" level="info">
            <title>TrapIndicator default value</title>
            <description>TrapIndicator has a default value. if it not present default value 1 is assumed</description>
            <reference>
                <section>Section 7.2.6: Data format</section>
                <page>14</page>
            </reference>
            <assert test="{!tags.tag[name=TrapIndicator]}">TrapIndicator has a default value. if it not present default value 1 is assumed</assert>
        </rule>
    </rules>

    <rules id="TAG-1-262">
        <title>PhotometricInterpretation</title>
        <description>The color space of the image data.

            Tag = 262 (106.H)
            Type = SHORT
            N = 1
            No default

            Currently defined values are:
            0 = BackgroundColor. Recommended for MP, BP, and BL images
            1 = ImageColor (foreground colour). for MP, BP, and BL images
            2 = RGB. In the RGB model, a color is described as a combination of the three primary colors of light (red, green, and blue) in particular concentrations.
            5 = CMYK. (The primary colour space for TIFF/IT Standard) for CT, LW, SD, and HC images, file data in the sequence CMYK, or separated image file data in other colours or sequences if modified by other fields.
            6 = YCbCr.
            8 = CIE L*a*b*.


            There is no default for PhotometricInterpretation, and it is required. Do not rely
            on applications defaulting to what you want.</description>



        <rule id="TAG-262-1-0003" context="ifd" level="error">
            <title>Valid Photometric Interpretation value</title>
            <description>The Photometric Interpretation tag must have a valid value.

                0 = WhiteIsZero. For bilevel and grayscale images: 0 is imaged as white.
                1 = BlackIsZero. For bilevel and grayscale images: 0 is imaged as black.
                2 = RGB. RGB value of (0,0,0) represents black, and (255,255,255) represents white, assuming 8-bit components. The components are stored in the indicated order: first Red, then Green, then Blue.
                3 = Palette color. In this model, a color is described with a single component. The value of the component is used as an index into the red, green and blue curves in the ColorMap field to retrieve an RGB triplet that defines the color. When PhotometricInterpretation=3 is used, ColorMap must be present and SamplesPerPixel must be 1.
                4 = Transparency Mask. This means that the image is used to define an irregularly shaped region of another image in the same TIFF file. SamplesPerPixel and BitsPerSample must be 1. PackBits compression is recommended. The 1-bits define the interior of the region; the 0-bits define the exterior of the region.
                5 = CMYK.The primary colour space for TIFF/IT Standard.</description>
            <reference><section>Section 7.2.8: Colour specification</section><page>15</page></reference>
            <assert test="{tags.tag[name=PhotometricInterpretation] &gt; -1} &amp;&amp; {tags.tag[name=PhotometricInterpretation] &lt; 5}">Photometric Interpretation value must be between 0 and 4</assert>
        </rule>
    </rules>

    <rules id="TAG-34017">
        <title>ColorSequence</title>
        <description>This field specified optional colours or colour sequences

            Tag = 34017 (84E1.H)
            Type = ASCII
            No default</description>

        <rule id="TAG-34017-0001" context="tag[id=34017]" level="error">
            <title>ColorSequence tag valid Type</title>
            <description>ColorSequence Tag type must be ASCII</description>
            <reference><section>Section 7.2.8: Colour specification</section><page>16</page></reference>
            <assert test="{type=='ASCII'}">ColorSequence Tag type is not valid, an ASCII type is expected</assert>
        </rule>
        <rule id="TAG-34017-0002" context="tag[id=34017]" level="error">
            <title>ColorSequence tag valid Cardinality</title>
            <description>The total number of unique entries in ColorSequence is limited to sixteen (16).</description>
            <reference><section>Section 7.2.8: Colour specification</section><page>16</page></reference>
            <assert test="{cardinality &lt; 18}">The total number of unique entries in ColorSequence is limited to sixteen</assert>
        </rule>
    </rules>

    <rules id="TAG-332-1">
        <title>InkSet</title>
        <description>The set of inks used in a separated (PhotometricInterpretation=5) image.

            Tag = 332 (14C.H)
            Type = SHORT
            N = 1
            Default is 1

            Current values are:
            1 = CMYK. The order of the components is cyan, magenta, yellow, black. Usually, a value of 0 represents 0% ink coverage and a value of 255 represents 100% ink coverage for that component, but see DotRange below. The InkNames field should not exist when InkSet=1.
            2 = not CMYK. See the InkNames field for a description of the inks to be used.</description>

        <rule id="TAG-332-1-0001" context="tag[id=332]" level="error">
            <title>InkSet tag valid Type</title>
            <description>InkSet Tag type must be SHORT</description>
            <reference><section>Section 7.2.8: Colour specification</section><page>17</page></reference>
            <assert test="{type=='SHORT'}">InkSet Tag type is not valid, a SHORT type is expected</assert>
        </rule>

        <rule id="TAG-332-1-0002" context="tag[id=332]" level="error">
            <title>InkSet valid cardinality</title>
            <description>The cardinality of the InkSet tag must be 1</description>
            <reference><section>Section 7.2.8: Colour specification</section><page>17</page></reference>
            <assert test="{cardinality==1}">InkSet cardinality is not valid, cardinality should be 1</assert>
        </rule>

        <rule id="TAG-332-1-0003" context="ifd" level="warning">
            <title>InkSet only in CMYK Image IFD</title>
            <description>InkSet should only be used in a Image File Directory containing a CMYK image</description>
            <reference><section>Section 7.2.8: Colour specification</section><page>17</page></reference>
            <assert test="{tags.tag[name=InkSet]} &amp;&amp; {type != 'CMYK'}">InkSet tag should only be used in a Image File Directory containing a CMYK image</assert>
        </rule>
        <!--
        <rule id="IFDB-0003" context="ifd[type=CMYK]" level="warning">
         <title>InkSet CMYK no need InkNames</title>
         <description>The InkNames field should not exist when InkSet=1 (CMYK image)</description>
         <reference><section>Section 16: CMYK Images</section><page>69</page></reference>
         <assert test="{!tags.tag[name=InkSet]} &amp;&amp; {tags.tag[name=InkNames]} || {tags.tag[name=InkSet] == 1} &amp;&amp; {tags.tag[name=InkNames]}">invalid BitsPerSample  cardinality in CMYK image IFD</assert>
        </rule>
        -->
        <rule id="TAG-332-0004" context="ifd[type=CMYK]" level="error">
            <title>InkSet no CMYK need InkNames</title>
            <description>The InkNames field must exist when InkSet=2 (No CMYK image)</description>
            <reference><section>Section 7.2.8: Colour specification</section><page>17</page></reference>
            <assert test="{tags.tag[name=InkSet] == 1} || {!tags.tag[name=InkSet]} || {tags.tag[name=InkNames]}">InkNames field must exist when InkSet=2</assert>
        </rule>

        <rule id="TAG-332-0005" context="ifd[type=CMYK]" level="info">
            <title>InkSet default value</title>
            <description>When Inkset is not defined in a CMYK image then the default value 1 (CMYK) is assumed</description>
            <reference><section>Section 7.2.8: Colour specification</section><page>17</page></reference>
            <assert test="{!tags.tag[name=InkSet]}">InkSet not defined the default value 1(CMYK) is assumed</assert>
        </rule>
    </rules>

    <rules id="TAG-334-1">
        <title>NumberOfInks</title>
        <description>The number of inks. Usually equal to SamplesPerPixel, unless there are extra samples.

            Tag = 334 (14E.H)
            Type = SHORT
            N = 1
            Default is 4 </description>

        <rule id="TAG-334-1-0001" context="tag[id=334]" level="error">
            <title>NumberOfInks tag valid Type</title>
            <description>NumberOfInks Tag type must be LONG</description>
            <reference><section>Section 7.2.8: Colour specification</section><page>17</page></reference>
            <assert test="{type=='SHORT'}">NumberOfInks Tag type is not valid, a LONG type is expected</assert>
        </rule>

        <rule id="TAG-334-1-0002" context="tag[id=334]" level="error">
            <title>NumberOfInks valid cardinality</title>
            <description>The cardinality of the NumberOfInks tag must be 1</description>
            <reference><section>Section 7.2.8: Colour specification</section><page>17</page></reference>
            <assert test="{cardinality==1}">NumberOfInks cardinality is not valid, cardinality should be 1</assert>
        </rule>

        <rule id="TAG-334-1-0003" context="ifd" level="warning">
            <title>NumberOfInks only in CMYK Image IFD</title>
            <description>NumberOfInks should only be used in a Image File Directory containing a CMYK image</description>
            <reference><section>Section 7.2.8: Colour specification</section><page>17</page></reference>
            <assert test="{tags.tag[name=NumberOfInks]} &amp;&amp; {type != 'CMYK'}">NumberOfInks tag should only be used in a Image File Directory containing a CMYK image</assert>
        </rule>

        <rule id="TAG-334-1-0004" context="ifd[type=CMYK]" level="info">
            <title>NumberOfInks default value</title>
            <description>When NumberOfInks is not defined in a CMYK image then the default value 4 is assumed</description>
            <reference><section>Section 7.2.8: Colour specification</section><page>17</page></reference>
            <assert test="{!tags.tag[name=NumberOfInks]}">NumberOfInks not defined the default value 4 is assumed</assert>
        </rule>

        <rule id="TAG-334-1-0005" context="ifd[type=CMYK]" level="info">
            <title>NumberOfInks match SamplesPerPixel</title>
            <description>Unless ExtraSamples are used NumberOfInks must match SamplesPerPixel</description>
            <reference><section>Section 16: CMYK Images</section><page>69</page></reference>
            <assert test="{tags.tag[name=ExtraSamples]} || {!tags.tag[name=NumberOfInks]} || {tags.tag[name=NumberOfInks] == tags.tag[name=SamplesPerPixel]}">Unless ExtraSamples are used NumberOfInks must match SamplesPerPixel</assert>
        </rule>
    </rules>

    <rules id="TAG-333-1">
        <title>InkNames</title>
        <description>The name of each ink used in a separated (PhotometricInterpretation=5) image, written as a list of concatenated, NUL-terminated ASCII strings.
            The number of strings must be equal to NumberOfInks. The samples are in the same order as the ink names.

            Tag = 333 (14D.H)
            Type = ASCII
            N = total number of characters in all the ink name strings, including the NULs.
            No default</description>

        <rule id="TAG-333-1-0001" context="tag[id=333]" level="error">
            <title>InkNames tag valid Type</title>
            <description>InkNames Tag type must be ASCII</description>
            <reference><section>Section 7.2.8: Colour specification</section><page>17</page></reference>
            <assert test="{type=='ASCII'}">InkNames Tag type is not valid, an ASCII type is expected</assert>
        </rule>

        <rule id="TAG-333-1-0002" context="ifd[type=CMYK]" level="error">
            <title>InkNames valid cardinality</title>
            <description>The cardinality InkNames Tag type must be equal of NumberOfInks</description>
            <reference><section>Section 7.2.8: Colour specification</section><page>17</page></reference>
            <assert test="{!tags.tag[name=InkNames]} || {tags.tag[name=InkNames].cardinality == 4} || {tags.tag[name=InkNames].cardinality == tags.tag[name=NumberOfInks]}">InkNames invalid cardinality, InkNames Tag type must be equal of NumberOfInks</assert>
        </rule>

        <rule id="TAG-333-1-0003" context="ifd" level="warning">
            <title>InkNames only in CMYK Image IFD</title>
            <description>InkNames should only be used in a Image File Directory containing a CMYK image</description>
            <reference><section>Section 7.2.8: Colour specification</section><page>17</page></reference>
            <assert test="{tags.tag[name=InkNames]} &amp;&amp; {type != 'CMYK'}">InkNames tag should only be used in a Image File Directory containing a CMYK image</assert>
        </rule>
    </rules>

    <rules id="TAG-34032">
        <title>CMYKEquivalent</title>
        <description>CMYKEquivalent is the set of entries for the cyan, magenta, yellow and black inks that together define a
            colour that is expected to be as close as possible visually to 100 % of the specified ink.

            Tag = 34032 (84F0.H)
            Type = BYTE or SHORT
            N= Any
        </description>

        <rule id="TAG-34032-0001" context="tag[id=34032]" level="error">
            <title>CMYKEquivalent tag valid Type</title>
            <description>CMYKEquivalent Tag type must be BYTE or SHORT</description>
            <reference><section>Section 7.2.8: Colour specification</section><page>17</page></reference>
            <assert test="{type=='SHORT'} || {type=='BYTE'}">CMYKEquivalent Tag type is not valid, a BYTE or SHORT type is expected</assert>
        </rule>

        <rule id="TAG-34032-0002" context="ifd" level="warning">
            <title>CMYKEquivalent only in CMYK Image IFD</title>
            <description>CMYKEquivalent should only be used in a Image File Directory containing a CMYK image</description>
            <reference><section>Section 7.2.8: Colour specification</section><page>17</page></reference>
            <assert test="{tags.tag[name=CMYKEquivalent]} &amp;&amp; {type != 'CMYK'}">CMYKEquivalent tag should only be used in a Image File Directory containing a CMYK image</assert>
        </rule>
    </rules>


    <rules id="TAG-336">
        <title>DotRange</title>
        <description>The component values that correspond to a 0% dot and 100% dot. DotRange[0] corresponds to a 0% dot, and DotRange[1] corresponds to a 100% dot.
            If a DotRange pair is included for each component, the values for each component are stored together, so that the pair for Cyan would be first, followed by the pair for Magenta, and so on.
            Use of multiple dot ranges is, however, strongly discouraged in the interests of simplicity and compatibility with ANSI IT8 standards.
            A number of prepress systems like to keep some “headroom” and “footroom” on both ends of the range. What to do with components that are less than the 0% aim point or greater than the 100% aim point is not specified and is application-dependent.

            It is strongly recommended that a CMYK TIFF writer not attempt to use this field to reverse the sense of the pixel values so that smaller values mean more ink instead of less ink. That is, DotRange[0] should be less than DotRange[1].
            DotRange[0] and DotRange[1] must be within the range [0, (2**BitsPerSample) - 1].

            Tag = 336 (150.H)
            Type = BYTE or SHORT
            N = 2
            Default: a component value of 0 corresponds to a 0% dot, and a component value of 255 (assuming 8-bit pixels) corresponds to a 100% dot. That is, DotRange[0] = 0 and DotRange[1] = (2**BitsPerSample) - 1.
        </description>


        <rule id="TAG-336-0001" context="tag[id=336]" level="error">
            <title>DotRange tag valid Type</title>
            <description>DotRange Tag type must be BYTE or SHORT</description>
            <reference><section>Section 7.2.8: Colour specification</section><page>18</page></reference>
            <assert test="{type=='BYTE'} || {type=='SHORT'}">DotRange Tag type is not valid, a BYTE or SHORT type is expected</assert>
        </rule>

        <rule id="TAG-336-0002" context="ifd[type=CMYK]" level="error">
            <title>DotRange valid cardinality</title>
            <description>The cardinality DotRange Tag type must be 2</description>
            <reference><section>Section 7.2.8: Colour specification</section><page>18</page></reference>
            <assert test="{tags.tag[name=DotRange].cardinality == 2}">DotRange invalid cardinality, DotRange Tag cardinality must be equal 2 </assert>
        </rule>

        <rule id="TAG-336-0004" context="tag[id=336]" level="warning" experimental="true">
            <title>DotRange used to revers pixel values</title>
            <description>It is strongly discouraged that a CMYK TIFF writer attempt to use this field to reverse the sense of the pixel values so that smaller values mean more ink instead of less ink. That is, DotRange[0] should be less than DotRange[1].</description>
            <reference><section>Section 7.2.8: Colour specification</section><page>18</page></reference>
            <assert test="{tags.tag[name=InkNames](0) &gt; tags.tag[name=InkNames](1)}">InkNames used to reverse the sense of the pixel, That is strongly discouraged</assert>
        </rule>

        <rule id="TAG-336-0005" context="ifd" level="warning">
            <title>DotRange only in CMYK Image IFD</title>
            <description>DotRange should only be used in a Image File Directory containing a CMYK image</description>
            <reference><section>Section 7.2.8: Colour specification</section><page>18</page></reference>
            <assert test="{tags.tag[name=DotRange]} &amp;&amp; {type != 'CMYK'}">DotRange tag should only be used in a Image File Directory containing a CMYK image</assert>
        </rule>

    </rules>



    <rules id="TAG-34029">
        <title>ColorCharacterization</title>
        <description>The colour values of separated, RGB or other colour images may be further characterized by the use of data tables as specified in ISO 12641 and ISO 12642, or a named colour space, such as “sRBG” as defined in IEC 61966-2-1.
            These ASCII data tables may be carried with the image file they describe by use of the ColorCharacterization field.

            Tag = 34029 (84ED.H)
            Type = ASCII
            No default</description>

        <rule id="TAG-34029-0001" context="tag[id=34029]" level="error">
            <title>ColorCharacterization tag valid Type</title>
            <description>ColorCharacterization Tag type must be ASCII</description>
            <reference><section>Section 7.2.8: Colour specification</section><page>19</page></reference>
            <assert test="{type=='ASCII'}">ColorCharacterization Tag type is not valid, an ASCII type is expected</assert>
        </rule>
    </rules>

    <rules id="TAG-34675">
        <title>InterColourProfile</title>
        <description>This tag encodes an embedded InterColour device profile relating to the camera colour characterization. Refer to
            "ICC.1:2001, File Format for Colour Profiles", for further information on the use of this tag. Note that the ICC Profile
            Format may be revised in the future and the most recent version of the ICC specification should be used.

            Tag = 34675 (8773.H)
            Type = UNDEFINED
            N = any (actual size of the embedded IC profile in bytes)</description>

        <rule id="TAG-34675-0001" context="tag[id=34675]" level="error">
            <title>InterColourProfile tag valid Type</title>
            <description>InterColourProfile Tag type must be UNDEFINED</description>
            <reference><section>Annex J: ICC Profile tag in TIFF/IT</section><page>69</page></reference>
            <assert test="{type=='UNDEFINED'}">InterColourProfile Tag type is not valid, an UNDEFINED type is expected</assert>
        </rule>

        <rule id="TAG-34675-0002" context="tag[id=34675]" level="error">
            <title>InterColourProfile valid cardinality</title>
            <description>The cardinality of the InterColourProfile tag must be 1</description>
            <reference><section>Annex J: ICC Profile tag in TIFF/IT</section><page>69</page></reference>
            <assert test="{cardinality==1}">InterColourProfile cardinality is not valid, cardinality should be 1</assert>
        </rule>
        <rule id="TAG-34675-0003" context="ifd[class=image]" level="error">
            <title>InterColourProfile invalid location</title>
            <description>ICCProfile tags may be used as optional fields in TIFF/IT-CT, TIFF/IT-CT/P2, TIFF/IT-LW, TIFF/IT-LW/P2,
                TIFF/IT-HC, TIFF/IT-HC/P2, TIFF/IT-MP and TIFF/IT-MP/P2 files or images</description>
            <reference><section>Annex J: ICC Profile tag in TIFF/IT</section><page>69</page></reference>
            <assert test="{!tags.tag[name=InterColorProfile]} || {filetype!='hc'} || {filetype!='fp'} || {filetype!='bp'} || {filetype!='bl'} || {filetype!='sd'}">InterColourProfile is forbidden</assert>
        </rule>

    </rules>

    <rules id="TAG-34022">
        <title>ColorTable</title>
        <description>In LW images, colour values are specified by encoding them in a colour palette table.

            Tag = 34675 (8773.H)
            Type = BYTE
            N = (Last Valid Colour + 1)*20 </description>

        <rule id="TAG-34022-0001" context="tag[id=34022]" level="error">
            <title>ColorTable tag valid Type</title>
            <description>ColorTable Tag type must be BYTE</description>
            <reference><section>Section 7.2.8: Colour specification</section><page>19</page></reference>
            <assert test="{type=='BYTE'}">ColorTable Tag type is not valid, an BYTE type is expected</assert>
        </rule>
        <rule id="TAG-34022-0002" context="tag[id=34022]" level="error" experimental="true">
            <title>ColorTable valid cardinality</title>
            <description>The cardinality of the ColorTable tag must be (LastValidColour + 1)*20</description>
            <reference><section>Section 7.2.8: Colour specification</section><page>19</page></reference>
            <assert test="{cardinality== (LastValidColour + 1)*20}">ColorTable cardinality is not valid, cardinality should be (LastValidColour + 1)*20</assert>
        </rule>
        <rule id="TAG-34022-0003" context="ifd[class=image]" level="error">
            <title>ColorTable valid only in LW file</title>
            <description>ColorTable should only be used in TIFF/IT-LW files</description>
            <reference><section>Section 7.2.8: Colour specification</section><page>19</page></reference>
            <assert test="{!tags.tag[name=ColorTable]} || {filetype=='lw'}">ColorTable should only be used in TIFF/IT-LW files</assert>
        </rule>
    </rules>

    <rules id="TAG-34025">
        <title>ImageColorValue</title>
        <description>This field denote the value of the image color in BP and BL images

            Tag = 34025 (84E9.H)
            Type = BYTE
            N = 1</description>

        <rule id="TAG-34025-0001" context="tag[id=34025]" level="error">
            <title>ImageColorValue tag valid Type</title>
            <description>ImageColorValue Tag type must be BYTE</description>
            <reference><section>Section 7.2.8: Colour specification</section><page>19</page></reference>
            <assert test="{type=='BYTE'}">ImageColorValue Tag type is not valid, an BYTE type is expected</assert>
        </rule>

        <rule id="TAG-34025-0002" context="tag[id=34025]" level="error">
            <title>ImageColorValue valid cardinality</title>
            <description>The cardinality of the ImageColorValue tag must be 1</description>
            <reference><section>Section 7.2.8: Colour specification</section><page>19</page></reference>
            <assert test="{cardinality==1}">ImageColorValue cardinality is not valid, cardinality should be 1</assert>
        </rule>
        <rule id="TAG-34025-0003" context="ifd[class=image]" level="error">
            <title>ImageColorValue valid only in BP and BL files</title>
            <description>ImageColorValue should only be used in TIFF/IT-BP and TIFF/IT-BL files</description>
            <reference><section>Section 7.2.8: Colour specification</section><page>19</page></reference>
            <assert test="{!tags.tag[name=ImageColorValue]} || {filetype=='bp'} ||  {filetype=='bl'}">ImageColorValue should only be used in TIFF/IT-BP and TIFF/IT-BL files</assert>
        </rule>
    </rules>

    <rules id="TAG-34026">
        <title>BackgroundColorValue</title>
        <description>This field denote the value of the image background in BP and BL images

            Tag = 34026 (84EA.H)
            Type = BYTE
            N = 1</description>

        <rule id="TAG-34026-0001" context="tag[id=34026]" level="error">
            <title>BackgroundColorValue tag valid Type</title>
            <description>BackgroundColorValue Tag type must be BYTE</description>
            <reference><section>Section 7.2.8: Colour specification</section><page>19</page></reference>
            <assert test="{type=='BYTE'}">BackgroundColorValue Tag type is not valid, an BYTE type is expected</assert>
        </rule>

        <rule id="TAG-34026-0002" context="tag[id=34026]" level="error">
            <title>BackgroundColorValue valid cardinality</title>
            <description>The cardinality of the BackgroundColorValue tag must be 1</description>
            <reference><section>Section 7.2.8: Colour specification</section><page>19</page></reference>
            <assert test="{cardinality==1}">BackgroundColorValue cardinality is not valid, cardinality should be 1</assert>
        </rule>
        <rule id="TAG-34026-0003" context="ifd[class=image]" level="error">
            <title>BackgroundColorValue valid only in BP and BL files</title>
            <description>BackgroundColorValue should only be used in TIFF/IT-BP and TIFF/IT-BL files</description>
            <reference><section>Section 7.2.8: Colour specification</section><page>19</page></reference>
            <assert test="{!tags.tag[name=BackgroundColorValue]} || {filetype=='bp'} ||  {filetype=='bl'}">BackgroundColorValue should only be used in TIFF/IT-BP and TIFF/IT-BL files</assert>
        </rule>
    </rules>

    <rules id="TAG-34027">
        <title>PixelIntensityRange</title>
        <description>The pixels in an MP image denote intensities of a particular colour. The colour is defined by the ImageColorValue field.
            Similar to the DotRange field, percent intensity may be mapped into two-byte values as indicated by the field PixelIntensityRange

            Tag = 34027 (84EB.H)
            Type = BYTE
            N = 2
            Default values : 0,(2**BitsPerSample−1)</description>

        <rule id="TAG-34027-0001" context="tag[id=34027]" level="error">
            <title>PixelIntensityRange tag valid Type</title>
            <description>PixelIntensityRange Tag type must be BYTE</description>
            <reference><section>Section 7.2.8: Colour specification</section><page>19</page></reference>
            <assert test="{type=='BYTE'}">PixelIntensityRange Tag type is not valid, an BYTE type is expected</assert>
        </rule>

        <rule id="TAG-34027-0002" context="tag[id=34027]" level="error">
            <title>PixelIntensityRange valid cardinality</title>
            <description>The cardinality of the PixelIntensityRange tag must be 2</description>
            <reference><section>Section 7.2.8: Colour specification</section><page>19</page></reference>
            <assert test="{cardinality==2}">PixelIntensityRange cardinality is not valid, cardinality should be 2</assert>
        </rule>
        <rule id="TAG-34027-0003" context="ifd[filetype=mp]" level="info">
            <title>PixelIntensityRange default value</title>
            <description>PixelIntensityRange has a default value. if it not present default value 0,(2**BitsPerSample−1) is assumed</description>
            <reference><section>Section 7.2.8: Colour specification</section><page>19</page></reference>
            <assert test="{!tags.tag[name=PixelIntensityRange]}">PixelIntensityRange has a default value. if it not present default value 0,(2**BitsPerSample−1) is assumed</assert>
        </rule>
        <rule id="TAG-34027-0004" context="ifd[class=image]" level="error">
            <title>PixelIntensityRange valid only in MP files</title>
            <description>PixelIntensityRange should only be used in TIFF/IT-MP files</description>
            <reference><section>Section 7.2.8: Colour specification</section><page>19</page></reference>
            <assert test="{!tags.tag[name=PixelIntensityRange]} || {filetype=='mp'}">PixelIntensityRange should only be used in TIFF/IT-MP files</assert>
        </rule>
    </rules>

    <rules id="TAG-34028">
        <title>TransparencyIndicator</title>
        <description>TransparencyIndicator is used as a transparency indicator for HC files.

            Tag = 34028 (84EC.H)
            Type = BYTE
            N = 1
            Default 0

            valid values are:
            0 = signifies that transparency is not used
            1 = transparency is used
        </description>

        <rule id="TAG-34028-0001" context="tag[id=34028]" level="error">
            <title>TransparencyIndicator tag valid Type</title>
            <description>TransparencyIndicator Tag type must be BYTE</description>
            <reference><section>Section 7.2.8: Colour specification</section><page>19</page></reference>
            <assert test="{type=='BYTE'}">TransparencyIndicator Tag type is not valid, an BYTE type is expected</assert>
        </rule>

        <rule id="TAG-34028-0002" context="tag[id=34028]" level="error">
            <title>TransparencyIndicator valid cardinality</title>
            <description>The cardinality of the TransparencyIndicator tag must be 1</description>
            <reference><section>Section 7.2.8: Colour specification</section><page>19</page></reference>
            <assert test="{cardinality==1}">TransparencyIndicator cardinality is not valid, cardinality should be 1</assert>
        </rule>

        <rule id="TAG-34028-0003" context="ifd[filetype=hc]" level="error">
            <title>TransparencyIndicator valid values</title>
            <description>The only valid values for TransparencyIndicator are:
                0 = signifies that transparency is not used
                1 = signifies that transparency is used</description>
            <reference><section>Section 7.2.8: Colour specification</section><page>19</page></reference>
            <assert test="{tags.tag[name=TransparencyIndicator] == 0} || {tags.tag[name=TransparencyIndicator] == 1}">TransparencyIndicator value is not valid, the only valid values are 0 and 1</assert>
        </rule>

        <rule id="TAG-34028-0004" context="ifd[filetype=hc]" level="info">
            <title>TransparencyIndicator default value</title>
            <description>TransparencyIndicator has a default value. if it not present default value 0, no transparency, is assumed</description>
            <reference><section>Section 7.2.8: Colour specification</section><page>19</page></reference>
            <assert test="{!tags.tag[name=TransparencyIndicator]}">TransparencyIndicator has a default value. if it not present default value 0 is assumed</assert>
        </rule>
        <rule id="TAG-34028-0005" context="ifd[class=image]" level="error">
            <title>TransparencyIndicator valid only in HC files</title>
            <description>TransparencyIndicator should only be used in TIFF/IT-HC  files</description>
            <reference><section>Section 7.2.8: Colour specification</section><page>19</page></reference>
            <assert test="{!tags.tag[name=TransparencyIndicator]} || {filetype=='hc'}">TransparencyIndicator should only be used in TIFF/IT-HC files</assert>
        </rule>
    </rules>

    <rules id="TAG-34023">
        <title>ImageColorIndicator</title>
        <description>The data stream for binary images (BP, BL and MP) functions as a switch between foreground and background colours.
            The ImageColorIndicator field indicates whether or not the particular image colour is encoded in the binary image (along with information about transparency) or in the monochrome continuoustone picture image (where no background colour exists)

            Tag = 34023 (84E7.H)
            Type = BYTE
            N = 1
            Default 0

            Valid values are:

            0 = image/background colour not defined (default value);
            1 = image/background colour defined;
            2 = full transparency, image/background colour not defined.
        </description>
        <rule id="TAG-34023-0001" context="tag[id=34023]" level="error">
            <title>ImageColorIndicator tag valid Type</title>
            <description>ImageColorIndicator Tag type must be BYTE</description>
            <reference><section>Section 7.2.9: Image and background colour indicators</section><page>19</page></reference>
            <assert test="{type=='BYTE'}">ImageColorIndicator Tag type is not valid, an BYTE type is expected</assert>
        </rule>

        <rule id="TAG-34023-0002" context="tag[id=34023]" level="error">
            <title>ImageColorIndicator valid cardinality</title>
            <description>The cardinality of the ImageColorIndicator tag must be 1</description>
            <reference><section>Section 7.2.9: Image and background colour indicators</section><page>19</page></reference>
            <assert test="{cardinality==1}">ImageColorIndicator cardinality is not valid, cardinality should be 1</assert>
        </rule>
        <rule id="TAG-34023-0003" context="ifd[filetype=hc]" level="error">
            <title>ImageColorIndicator valid values</title>
            <description>The only valid values for ImageColorIndicator are:
                0 = image/background colour not defined (default value);
                1 = image/background colour defined;
                2 = full transparency, image/background colour not defined.</description>
            <reference><section>Section 7.2.9: Image and background colour indicators</section><page>19</page></reference>
            <assert test="{tags.tag[name=ImageColorIndicator] &gt; -1 } &amp;&amp; {tags.tag[name=ImageColorIndicator] &lt; 3}">ImageColorIndicator value is not valid, the only valid values are 0 and 1</assert>
        </rule>
        <rule id="TAG-34023-0004" context="ifd[filetype=bp]" level="info">
            <title>ImageColorIndicator default value in TIFF/IT-BP</title>
            <description>ImageColorIndicator has a default value. if it not present default value 0,  image/background colour not defined, is assumed</description>
            <reference><section>Section 7.2.9: Image and background colour indicators</section><page>19</page></reference>
            <assert test="{!tags.tag[name=ImageColorIndicator]}">ImageColorIndicator has a default value. if it not present default value 0 is assumed</assert>
        </rule>
        <rule id="TAG-34023-0005" context="ifd[filetype=bl]" level="info">
            <title>ImageColorIndicator default value in TIFF/IT-BL</title>
            <description>ImageColorIndicator default value in TIFF/IT-BL</description>
            <reference><section>Section 7.2.9: Image and background colour indicators</section><page>19</page></reference>
            <assert test="{!tags.tag[name=ImageColorIndicator]}">ImageColorIndicator has a default value. if it not present default value 0 is assumed</assert>
        </rule>
        <rule id="TAG-34023-0006" context="ifd[filetype=mp]" level="info">
            <title>ImageColorIndicator default value in TIFF/IT-MP</title>
            <description>ImageColorIndicator has a default value. if it not present default value 0,  image/background colour not defined, is assumed</description>
            <reference><section>Section 7.2.9: Image and background colour indicators</section><page>19</page></reference>
            <assert test="{!tags.tag[name=ImageColorIndicator]}">ImageColorIndicator has a default value. if it not present default value 0 is assumed</assert>
        </rule>
        <rule id="TAG-34023-0007" context="ifd[class=image]" level="error">
            <title>ImageColorIndicator valid only in BP, BL and MP files</title>
            <description>ImageColorIndicator should only be used in TIFF/IT-BP, TIFF/IT-BL and TIFF/IT-MP  files</description>
            <reference><section>Section 7.2.9: Image and background colour indicators</section><page>19</page></reference>
            <assert test="{!tags.tag[name=ImageColorIndicator]} || {filetype=='bp'} || {filetype=='bl'} || {filetype=='mp'}">ImageColorIndicator should only be used in TIFF/IT-HC files</assert>
        </rule>
    </rules>

    <rules id="TAG-34024">
        <title>BackgroundColorIndicator</title>
        <description>The data stream for binary images (BP and BL) functions as a switch between foreground and background colours.
            The BackgroundColorIndicator field indicates whether or not the particular foreground colour is encoded in the binary image (along with information about transparency) or in the monochrome continuoustone picture image (where no background colour exists)

            Tag = 34024 (84E8.H)
            Type = BYTE
            N = 1
            Default 0

            Valid values are:

            0 = image/background colour not defined (default value);
            1 = image/background colour defined;
            2 = full transparency, image/background colour not defined.
        </description>
        <rule id="TAG-34024-0001" context="tag[id=34024]" level="error">
            <title>BackgroundColorIndicator tag valid Type</title>
            <description>BackgroundColorIndicator Tag type must be BYTE</description>
            <reference><section>Section 7.2.9: Image and background colour indicators</section><page>19</page></reference>
            <assert test="{type=='BYTE'}">BackgroundColorIndicator Tag type is not valid, an BYTE type is expected</assert>
        </rule>

        <rule id="TAG-34024-0002" context="tag[id=34024]" level="error">
            <title>BackgroundColorIndicator valid cardinality</title>
            <description>The cardinality of the BackgroundColorIndicator tag must be 1</description>
            <reference><section>Section 7.2.9: Image and background colour indicators</section><page>19</page></reference>
            <assert test="{cardinality==1}">BackgroundColorIndicator cardinality is not valid, cardinality should be 1</assert>
        </rule>
        <rule id="TAG-34024-0003" context="ifd[filetype=hc]" level="error">
            <title>BackgroundColorIndicator valid values</title>
            <description>The only valid values for ImageColorIndicator are:
                0 = image/background colour not defined (default value);
                1 = image/background colour defined;
                2 = full transparency, image/background colour not defined.</description>
            <reference><section>Section 7.2.9: Image and background colour indicators</section><page>19</page></reference>
            <assert test="{tags.tag[name=BackgroundColorIndicator] &gt; -1 } &amp;&amp; {tags.tag[name=BackgroundColorIndicator] &lt; 3}">BackgroundColorIndicator value is not valid, the only valid values are 0 and 1</assert>
        </rule>
        <rule id="TAG-34024-0004" context="ifd[filetype=bp]" level="info">
            <title>BackgroundColorIndicator default value in TIFF/IT-BP</title>
            <description>BackgroundColorIndicator has a default value. if it not present default value 0,  image/background colour not defined, is assumed</description>
            <reference><section>Section 7.2.9: Image and background colour indicators</section><page>19</page></reference>
            <assert test="{!tags.tag[name=BackgroundColorIndicator]}">BackgroundColorIndicator has a default value. if it not present default value 0 is assumed</assert>
        </rule>
        <rule id="TAG-34024-0005" context="ifd[filetype=bl]" level="info">
            <title>BackgroundColorIndicator default value in TIFF/IT-BL</title>
            <description>BackgroundColorIndicator has a default value. if it not present default value 0,  image/background colour not defined, is assumed</description>
            <reference><section>Section 7.2.9: Image and background colour indicators</section><page>19</page></reference>
            <assert test="{!tags.tag[name=BackgroundColorIndicator]}">BackgroundColorIndicator has a default value. if it not present default value 0 is assumed</assert>
        </rule>

        <rule id="TAG-34024-0007" context="ifd[class=image]" level="error">
            <title>BackgroundColorIndicator valid only in HC files</title>
            <description>BackgroundColorIndicator should only be used in TIFF/IT-BP and TIFF/IT-BL files</description>
            <reference><section>Section 7.2.9: Image and background colour indicators</section><page>19</page></reference>
            <assert test="{!tags.tag[name=BackgroundColorIndicator]} || {filetype=='bp'} || {filetype=='bl'}">BackgroundColorIndicator should only be used in TIFF/IT-HC files</assert>
        </rule>

    </rules>

    <rules id="TAG-301">
        <title>TransferFunction</title>
        <description>Describes a transfer function for the image in tabular style. Pixel components can be gamma-compensated, companded, non-uniformly quantized, or coded in some other way. The TransferFunction maps the pixel components from a non-linear
            BitsPerSample (e.g. 8-bit) form into a 16-bit linear form without a perceptible loss of accuracy.

            If N = 1 &lt;&lt; BitsPerSample, the transfer function is the same for each channel and all channels share a single table. Of course, this assumes that each channel has the same BitsPerSample value.
            If N = 3 * (1 &lt;&lt;  BitsPerSample), there are three tables, and the ordering is the same as it is for pixel components of the PhotometricInterpretation field. These tables are separate and not interleaved. For example, with RGB images all red entries come first, followed by all green entries, followed by all blue entries.

            Tag =301 (12D.H)
            Type = SHORT
            N = {1 or 3} * (1 &lt;&lt; BitsPerSample)
            No default</description>

        <rule id="TAG-301-0001" context="tag[id=301]" level="error">
            <title>TransferFunction tag valid Type</title>
            <description>TransferFunction Tag type must be SHORT</description>
            <reference><section>Annex G: RGB color-space data in TIFF/IT</section><page>62</page></reference>
            <assert test="{type=='SHORT'}">TransferFunction Tag type is not valid, a SHORT type is expected</assert>
        </rule>

        <rule id="TAG-301-0002" context="tag[id=301]" level="error" experimental="true">
            <title>TransferFunction valid cardinality</title>
            <description>The cardinality TransferFunction Tag type must be {1 or 3} * (1 &lt;&lt; BitsPerSample)</description>
            <reference><section>Annex G: RGB color-space data in TIFF/IT</section><page>62</page></reference>
            <assert test="{cardinality==2^BitsPerSample} || {cardinality==3*2^BitsPerSample}">TransferFunction invalid cardinality</assert>
        </rule>

        <rule id="TAG-301-0003" context="ifd[class=image]" level="error">
            <title>TransferFunction only in TIFF/IT-CT RGB image</title>
            <description>TransferFunction should only be used in a TIFF/IT-CT containing an RGB image</description>
            <reference><section>Annex G: RGB color-space data in TIFF/IT</section><page>62</page></reference>
            <assert test="{!tags.tag[name=TransferFunction]} || {type == RGB} &amp;&amp; {filetype=='ct'} ">TransferFunction tag should only be used in a TIFF/IT-CT containing an RGB image</assert>
        </rule>
    </rules>
    <rules id="TAG-318">
        <title>WhitePoint</title>
        <description>The chromaticity of the white point of the image. This is the chromaticity when each of the primaries has its ReferenceWhite value.
            The value is described using the 1931 CIE xy chromaticity diagram and only the chromaticity is specified.
            This value can correspond to the chromaticity of the alignment white of a monitor, the filter set and light source combination of a scanner or the imaging model of a rendering package. The ordering is white[x], white[y].

            Tag = 318 (13E.H)
            Type = RATIONAL
            N = 2
            No default</description>

        <rule id="TAG-318-0001" context="tag[id=318]" level="error">
            <title>WhitePoint tag valid Type</title>
            <description>WhitePoint Tag type must be RATIONAL</description>
            <reference><section>Annex G: RGB color-space data in TIFF/IT</section><page>62</page></reference>
            <assert test="{type=='RATIONAL'}">WhitePoint Tag type is not valid, a RATIONAL type is expected</assert>
        </rule>

        <rule id="TAG-318-0002" context="tag[id=318]" level="error">
            <title>WhitePoint valid cardinality</title>
            <description>The cardinality WhitePoint Tag type must be SamplesPerPixel</description>
            <reference><section>Annex G: RGB color-space data in TIFF/IT</section><page>62</page></reference>
            <assert test="{cardinality == 2 }">Invalid cardinality, WhitePoint cardinality should be 2</assert>
        </rule>
        <rule id="TAG-318-0003" context="ifd[class=image]" level="error">
            <title>WhitePoint only in TIFF/IT-CT RGB image</title>
            <description>WhitePoint should only be used in a TIFF/IT-CT containing an RGB image</description>
            <reference><section>Annex G: RGB color-space data in TIFF/IT</section><page>62</page></reference>
            <assert test="{!tags.tag[name=WhitePoint]} || {type == RGB} &amp;&amp; {filetype=='ct'} ">WhitePoint tag should only be used in a TIFF/IT-CT containing an RGB image</assert>
        </rule>
    </rules>
    <rules id="TAG-319">
        <title>PrimaryChromaticities</title>
        <description>The chromaticities of the primaries of the image. This is the chromaticity for each of the primaries when it has its ReferenceWhite value and the other primaries have their ReferenceBlack values.
            These values are described using the 1931 CIE xy chromaticity diagram and only the chromaticities are specified.
            These values can correspond to the chromaticities of the phosphors of a monitor, the filter set and light source combination of a scanner or the imaging model of a rendering  package.
            The ordering is red[x], red[y], green[x], green[y], blue[x], and blue[y].

            Tag =319 (13F.H)
            Type = RATIONAL
            N = 6
            No default</description>

        <rule id="TAG-319-0001" context="tag[id=319]" level="error">
            <title>PrimaryChromaticities tag valid Type</title>
            <description>PrimaryChromaticities Tag type must be RATIONAL</description>
            <reference><section>Annex G: RGB color-space data in TIFF/IT</section><page>62</page></reference>
            <assert test="{type=='RATIONAL'}">PrimaryChromaticities Tag type is not valid, a RATIONAL type is expected</assert>
        </rule>

        <rule id="TAG-319-0002" context="tag[id=319]" level="error">
            <title>PrimaryChromaticities valid cardinality</title>
            <description>The cardinality PrimaryChromaticities Tag type must be SamplesPerPixel</description>
            <reference><section>Annex G: RGB color-space data in TIFF/IT</section><page>62</page></reference>
            <assert test="{cardinality == 6 }">Invalid cardinality, PrimaryChromaticities cardinality should be 2</assert>
        </rule>
        <rule id="TAG-319-0003" context="ifd[class=image]" level="error">
            <title>PrimaryChromaticities only in TIFF/IT-CT RGB image</title>
            <description>PrimaryChromaticities should only be used in a TIFF/IT-CT containing an RGB image</description>
            <reference><section>Annex G: RGB color-space data in TIFF/IT</section><page>62</page></reference>
            <assert test="{!tags.tag[name=PrimaryChromaticities]} || {type == RGB} &amp;&amp; {filetype=='ct'} ">PrimaryChromaticities tag should only be used in a TIFF/IT-CT containing an RGB image</assert>
        </rule>
    </rules>
    <rules id="TAG-532">
        <title>ReferenceBlackWhite</title>
        <description>Specifies a pair of headroom and footroom image data values (codes) for each pixel component.
            The first component code within a pair is associated with ReferenceBlack, and the second is associated with ReferenceWhite.
            The ordering of pairs is the same as those for pixel components of the PhotometricInterpretation type.
            ReferenceBlackWhite can be applied to images with a PhotometricInterpretation value of RGB or YCbCr. ReferenceBlackWhite is not used with other PhotometricInterpretation values.

            Tag =532 (214.H)
            Type = RATIONAL
            N = 6
            Default is [0/,NV/1, 0/1, NV/1, 0/1, NV/1] where NV = 2 ** BitsPerSample - 1.
        </description>

        <rule id="TAG-532-0001" context="tag[id=532]" level="error">
            <title>ReferenceBlackWhite tag valid Type</title>
            <description>ReferenceBlackWhite Tag type must be RATIONAL</description>
            <reference><section>Annex G: RGB color-space data in TIFF/IT</section><page>62</page></reference>
            <assert test="{type=='RATIONAL'}">ReferenceBlackWhite Tag type is not valid, a RATIONAL type is expected</assert>
        </rule>

        <rule id="TAG-532-0002" context="tag[id=532]" level="error">
            <title>ReferenceBlackWhite valid cardinality</title>
            <description>The cardinality ReferenceBlackWhite Tag type must be 6</description>
            <reference><section>Annex G: RGB color-space data in TIFF/IT</section><page>62</page></reference>
            <assert test="{cardinality == 6 }">Invalid cardinality, ReferenceBlackWhite cardinality should be 6</assert>
        </rule>
        <rule id="TAG-532-0003" context="ifd[class=image]" level="error">
            <title>ReferenceBlackWhite only in TIFF/IT-CT RGB image</title>
            <description>ReferenceBlackWhite should only be used in a TIFF/IT-CT containing an RGB image</description>
            <reference><section>Annex G: RGB color-space data in TIFF/IT</section><page>62</page></reference>
            <assert test="{!tags.tag[name=ReferenceBlackWhite]} || {type == RGB} &amp;&amp; {filetype=='ct'} ">ReferenceBlackWhite tag should only be used in a TIFF/IT-CT containing an RGB image</assert>
        </rule>

    </rules>


    <rules id="TIFF-IT">
        <title>TIFF/IT a valid file type</title>
        <description>TIFF/IT must contain a valid file type. valid file types are:
            Colour continuous-tone picture (CT)
            Colour line-art (LW)
            High-resolution continuous-tone (HC)
            Monochrome continuous-tone picture (MP)
            Binary picture (BP)
            Binary line-art (BL)
            Screened data (SD)
            Final page (FP)
        </description>
        <rule id="TIFF-IT-0001" context="ifd[class=image]" level="error">
            <title>TIFF/IT a valid file type</title>
            <description>TIFF/IT specification define the following valid types a,TIFF/IT file must be classified in one of this types
                Colour continuous-tone picture (CT)
                Colour line-art (LW)
                High-resolution continuous-tone (HC)
                Monochrome continuous-tone picture (MP)
                Binary picture (BP)
                Binary line-art (BL)
                Screened data (SD)
                Final page (FP)</description>
            <reference>
                <section>Section 2.2: Image file type identification</section>
                <page>1</page>
            </reference>
            <assert test="{filetype=='ct'} || {filetype=='lw'} || {filetype=='hc'} || {filetype=='mp'} || {filetype=='bp'} || {filetype=='bl'} || {filetype=='sd'} || {filetype=='fp'}">Undefined file type</assert>
        </rule>
        <rule id="TIFF-IT-0002" context="ifd[class=image]" level="error">
            <title>XResolution mandatory</title>
            <description>XResolution is mandatory for a TIFF/IT file</description>
            <reference><section>section 7.3: Colour continuous-tone picture (CT) file</section><page>22</page></reference>
            <reference><section>section 7.4: Colour line-art (LW) file</section><page>25</page></reference>
            <reference><section>section 7.5: High-resolution continuous-tone (HC) file</section><page>32</page></reference>
            <reference><section>section 7.6: Monochrome continuous-tone picture (MP) file</section><page>35</page></reference>
            <reference><section>section 7.7: Binary picture (BP) file</section><page>38</page></reference>
            <reference><section>section 7.8: Binary line-art (BL) file</section><page>40</page></reference>
            <reference><section>section 7.9: Screened data image (SD) file</section><page>42</page></reference>
            <reference><section>section 7.10: Final Page (FP) file</section><page>44</page></reference>
            <assert test="{tags.tag[name=XResolution]}">XResolution is mandatory for  TIFF/IT file</assert>
        </rule>
        <rule id="TIFF-IT-0003" context="ifd[class=image]" level="error">
            <title>YResolution mandatory</title>
            <description>YResolution is mandatory for a TIFF/IT file</description>
            <reference><section>section 7.3: Colour continuous-tone picture (CT) file</section><page>22</page></reference>
            <reference><section>section 7.4: Colour line-art (LW) file</section><page>25</page></reference>
            <reference><section>section 7.5: High-resolution continuous-tone (HC) file</section><page>32</page></reference>
            <reference><section>section 7.6: Monochrome continuous-tone picture (MP) file</section><page>35</page></reference>
            <reference><section>section 7.7: Binary picture (BP) file</section><page>38</page></reference>
            <reference><section>section 7.8: Binary line-art (BL) file</section><page>40</page></reference>
            <reference><section>section 7.9: Screened data image (SD) file</section><page>42</page></reference>
            <reference><section>section 7.10: Final Page (FP) file</section><page>44</page></reference>
            <assert test="{tags.tag[name=YResolution]}">YResolution is mandatory for  TIFF/IT file</assert>
        </rule>
    </rules>

    <rules id="TIFF-IT-CT">
        <title>TIFF/IT-CT Colour continuous-tone picture</title>
        <description>There are three formats for describing the pixel structure of colour continuous-tone picture file data:
            pixel interleaving (also called chunky format).
            line interleaving (also called row interleaving).
            colour interleaving (also called planar format).

            TIFF/IT-CT makes use of all the features and functionality supported by the TIFF and TIFF/IT fields
            appropriate to colour continuous-tone picture images.

            TIFF/IT-CT for RGB (PhotometricInterpretation value of 2) and LAB (PhotometricInterpretation value of 8) can
            be considered as an expansion of TIFF/IT-CT (see Annex G and Annex H, respectively).
            TIFF/IT-CT permit optional JPEG or Flate compression of image data.

            NOTE Some machines and applications require data to be written to 16-bit word boundaries. Therefore, if the
            number of bytes per line is odd, there would be one fill byte at the end of each line. In this case, field 34019
            (RasterPadding) with value 1 indicates the value of the padding to the word boundary (word-aligned), and value 32895 for
            field 259 (Compression) indicates the presence of such padding.
        </description>

        <rule id="TIFF-IT-CT-0001" context="ifd[filetype=ct]" level="error" experimental="true">
            <title>TIFF/IT-CT BitsPerSample valid values for CMYK</title>
            <description>BitsPerSample on a colour continuous-tone picture (CT) CMYK file without InkSet tag must be [8,8,8,8] or [16,16,16,16]</description>
            <reference>
                <section>Section 7.3.3: TIFF/IT-CT encoding</section><page>24</page>
            </reference>
            <assert test="{imgtype!='norgblab'} || {type != 'CMYK'} || {tags.tag[name=InkSet]} || {tags.tag[name=InkSet] != 2} || {tags.tag[name=BitsPerSample] == '8,8,8,8'} || {tags.tag[name=BitsPerSample] == '16,16,16,16'}">Invalid BitsPerSample value. BitsPerSample should be [8,8,8,8] or [16,16,16,16]</assert>
        </rule>
        <rule id="TIFF-IT-CT-0002" context="ifd[filetype=ct]" level="error" experimental="true">
            <title>TIFF/IT-CT BitsPerSample valid values YCbCr</title>
            <description>BitsPerSample on a colour continuous-tone picture (CT) file must be [8,8,8] or [16,16,16]</description>
            <reference>
                <section>Section 7.3.3: TIFF/IT-CT encoding</section><page>24</page>
            </reference>
            <assert test="{imgtype!='norgblab'} || {type != 'YCbCr'} || {tags.tag[name=BitsPerSample] == '8,8,8'} || {tags.tag[name=BitsPerSample] == '16,16,16'}">Invalid BitsPerSample value. BitsPerSample should be [8,8,8] or [16,16,16]</assert>
        </rule>
        <rule id="TIFF-IT-CT-0003" context="ifd[filetype=ct]" level="error">
            <title>TIFF/IT-CT Compression valid values</title>
            <description>Compression valid values for colour continuous-tone picture (CT) are:
                1 = No compression
                7 = JPEG encoding scheme ('new-style' JPEG)
                8 = Deflate ('Adobe-style')
                32895 = the use of RasterPadding in the CT or MP format (IT8CTPAD)
            </description>
            <reference>
                <section>Section 7.3.3: TIFF/IT-CT encoding</section><page>23</page>
            </reference>
            <assert test="{imgtype!='norgblab'} || {tags.tag[name=Compression] == 1} || {tags.tag[name=Compression] == 7} || {tags.tag[name=Compression] == 8} || {tags.tag[name=Compression] == 32895}">Invalid Compression value for colour continuous-tone picture (CT) image</assert>
        </rule>
        <rule id="TIFF-IT-CT-0004" context="ifd[filetype=ct]" level="error">
            <title>TIFF/IT-CT Compression valid for YCbCr</title>
            <description>The only valid Compression value for colour continuous-tone picture (CT) YCbCr image is JPEG encoding scheme ('new-style' JPEG)</description>
            <reference>
                <section>Section 7.3.3: TIFF/IT-CT encoding</section><page>23</page>
            </reference>
            <assert test="{imgtype!='norgblab'} || {type != 'YCbCr'} || {tags.tag[name=Compression] == 7}">YCbCr images shall be used with JPEG encoding scheme ('new-style' JPEG)</assert>
        </rule>
        <rule id="TIFF-IT-CT-0005" context="ifd[filetype=ct]" level="error">
            <title>TIFF/IT-CT PhotometricInterpretation valid values</title>
            <description>PhotometricInterpretation valid values for colour continuous-tone picture (CT) are:
                2 = RGB. In the RGB model, a color is described as a combination of the three primary colors of light (red, green, and blue) in particular concentrations.
                5 = CMYK. (The primary colour space for TIFF/IT Standard) for CT, LW, SD, and HC images, file data in the sequence CMYK, or separated image file data in other colours or sequences if modified by other fields.
                6 = YCbCr.
                8 = CIE L*a*b*.
            </description>
            <reference>
                <section>Section 7.3.3: TIFF/IT-CT encoding</section><page>23</page>
            </reference>
            <assert test="{tags.tag[name=PhotometricInterpretation] == 2} || {tags.tag[name=PhotometricInterpretation] == 5} || {tags.tag[name=PhotometricInterpretation] == 6} || {tags.tag[name=PhotometricInterpretation] == 8}">Invalid PhotometricInterpretation value for colour continuous-tone picture (CT) image</assert>
        </rule>
        <rule id="TIFF-IT-CT-0006" context="ifd[filetype=ct]" level="error">
            <title>TIFF/IT-CT SamplesPerPixel valid values for CMYK</title>
            <description>SamplesPerPixel on a colour continuous-tone picture (CT) CMYK image without InkSet tag must be 4</description>
            <reference>
                <section>Section 7.3.3: TIFF/IT-CT encoding</section><page>23</page>
            </reference>
            <assert test="{imgtype!='norgblab'} || {type != 'CMYK'} || {tags.tag[name=InkSet]} || {tags.tag[name=InkSet] != 2} || {tags.tag[name=SamplesPerPixel] == 4}">Invalid SamplesPerPixel. SamplesPerPixel for colour continuous-tone picture (CT) CMYK image without InkSet tag should be 4</assert>
        </rule>
        <rule id="TIFF-IT-CT-0007" context="ifd[filetype=ct]" level="error">
            <title>TIFF/IT-CT SamplesPerPixel valid values for YCbCr</title>
            <description>SamplesPerPixel on a colour continuous-tone picture (CT) YCbCr image must be 3</description>
            <reference>
                <section>Section 7.3.3: TIFF/IT-CT encoding</section><page>23</page>
            </reference>
            <assert test="{imgtype!='norgblab'} || {type != 'YCbCr'} || {tags.tag[name=SamplesPerPixel] == 3}">Invalid SamplesPerPixel. SamplesPerPixel for colour continuous-tone picture (CT) YCbCr image should be 3</assert>
        </rule>
        <rule id="TIFF-IT-CT-0008" context="ifd[filetype=ct]" level="error" experimental="true">
            <title>TIFF/IT-CT InkSet match ColorSequence</title>
            <description>If InkSet tag is used and ColorSequence tag value is the default value of 'CMYK', InkSet shall have the value of 1. Otherwise, it shall have the value of 2.</description>
            <reference>
                <section>Section 7.3.3: TIFF/IT-CT encoding</section><page>23</page>
            </reference>
            <assert test="{imgtype!='norgblab'} || {!tags.tag[name=InkSet]} || {tags.tag[name=InkSet]!=1} || {!tags.tag[name=ColorSequence]} || {tags.tag[name=ColorSequence]=='CMYK'}">Inkset value not match with ColorSequence value.</assert>
        </rule>
        <rule id="TIFF-IT-CT-0009" context="ifd[filetype=ct]" level="error">
            <title>TIFF/IT-CT NumberOfInks valid value</title>
            <description>If NumberOfInks tag is used, it must have the same value as the value of SamplesPerPixel</description>
            <reference>
                <section>Section 7.3.3: TIFF/IT-CT encoding</section><page>23</page>
            </reference>
            <assert test="{!tags.tag[name=NumberOfInks]} || {tags.tag[name=NumberOfInks] == tags.tag[name=SamplesPerPixel]}">MumberOfInks value not match with SamplesPerPixel</assert>
        </rule>

        <rule id="TIFF-IT-CT-0010" context="ifd[filetype=ct]]" level="error">
            <title>TIFF/IT-CT ColorSequence valid values</title>
            <description>ColorSequence on a colour continuous-tone picture (CT) file must be CMYK or YMCK</description>
            <reference>
                <section>Section 7.3.3: TIFF/IT-CT encoding</section><page>23</page>
            </reference>
            <assert test="{imgtype!='norgblab'} || {tags.tag[name=ColorSequence] == 'CMYK'} || {tags.tag[name=ColorSequence] == 'YMCK'}">ColorSequence invalid value. The only valid values for ColorSequence are CMYK or YMCK</assert>
        </rule>
        <rule id="TIFF-IT-CT-0011" context="ifd[filetype=ct]]" level="error">
            <title>TIFF/IT-CT RasterPadding used</title>
            <description>When RasterPadding is used Compression must be 32895</description>
            <reference>
                <section>Section 7.3.3: TIFF/IT-CT encoding</section><page>23</page>
            </reference>
            <assert test="{imgtype!='norgblab'} || {!tags.tag[name=RasterPadding]} || {tags.tag[name=Compression] == 32895} ">RasterPadding used with incorrect compression. Compression should be IT8CTPAD (32895)</assert>
        </rule>
        <rule id="TIFF-IT-CT-0012" context="ifd[filetype=ct]]" level="error" experimental="true">
            <title>TIFF/IT-CT CMYKEquivalent cardinality</title>
            <description>The CMYKEquivalent cardinality is the value of SamplesPerPixel multiplied by 4</description>
            <reference>
                <section>Section 7.3.3: TIFF/IT-CT encoding</section><page>23</page>
            </reference>
            <assert test="{imgtype!='norgblab'} || {!tags.tag[name=CMYKEquivalent]} || {tags.tag[name=CMYKEquivalent].cardinaly == tags.tag[name=SamplePerPixel] * 4}">RasterPadding used with incorrect compression. Compression should be IT8CTPAD (32895)</assert>
        </rule>
    </rules>

    <rules id="TIFF-IT-CT-RGB">
        <title>RGB colour-space data in TIFF/IT-CT</title>
        <description>Annex G defines the TIFF/IT-CT file format where a PhotometricInterpretation value of 2 may be used for
            CT images with RGB colour space data. The RGB image type belongs to TIFF/IT-CT image type.

            When a PhotometricInterpretation value of 2 is used for TIFF/IT-CT images or files, the data shall be in RGB
            colour space. The encoded RGB data are the data that are directly suitable for display on typical RGB devices.

            In TIFF/IT-CT for the RGB colour-space data, the data area is specified by the StripOffsets and
            StripByteCounts tag fields. Usage of multiple data areas for the RGB colour space data may be accepted. If
            multiple data areas are used, a RowsPerStrip field shall be specified.

            The three formats of pixel interleaving, line interleaving and colour interleaving may be used for describing the
            pixel structure of the RGB colour-space data.

            A TIFF/IT-CT writer that specifies a PhotometricInterpretation
            value of 2 shall write in any one of the formats. A TIFF/IT-CT reader that reads TIFF/IT-CT files with a
            PhotometricInterpretation value of 2 shall read all three of the formats.
        </description>

        <rule id="TIFF-IT-CT-RGB-0001" context="ifd[filetype=ct]" level="error" experimental="true">
            <title>TIFF/IT-CT BitsPerSample valid values for RGB</title>
            <description>BitsPerSample on a colour continuous-tone picture (CT) RGB image must be [8,8,8] or [16,16,16]</description>
            <reference>
                <section>Annex G: RGB colour-space data in TIFF/IT-CT</section><page>61</page>
            </reference>
            <assert test="{imgtype!='rgb'} || {tags.tag[name=BitsPerSample] == '8,8,8'} || {tags.tag[name=BitsPerSample] == '16,16,16'}">Invalid BitsPerSample on a colour continuous-tone picture (CT) RGB image. BitsPerSample value should be [8,8,8] or [16,16,16]</assert>
        </rule>
        <rule id="TIFF-IT-CT-RGB-0002" context="ifd[filetype=ct]" level="error">
            <title>TIFF/IT-CT Compression valid values for RGB</title>
            <description>Compression valid values for colour continuous-tone picture (CT) are:
                1 = No compression
                7 = JPEG encoding scheme ('new-style' JPEG)
                8 = Deflate ('Adobe-style')</description>
            <reference>
                <section>Annex G: RGB colour-space data in TIFF/IT-CT</section><page>61</page>
            </reference>
            <assert test="{imgtype!='rgb'} || {tags.tag[name=Compression] == 1} || {tags.tag[name=Compression] == 7} || {tags.tag[name=Compression] == 8}">Invalid Compression value for colour continuous-tone picture (CT) RGB image</assert>
        </rule>
        <rule id="TIFF-IT-CT-RGB-0003" context="ifd[filetype=ct]" level="error">
            <title>TIFF/IT-CT SamplesPerPixel valid values for RGB</title>
            <description>BitsPerSample on a colour continuous-tone picture (CT) RGB image must be 3</description>
            <reference>
                <section>Annex G: RGB colour-space data in TIFF/IT-CT</section><page>61</page>
            </reference>
            <assert test="{imgtype!='rgb'} || {tags.tag[name=SamplesPerPixel] == 3}">Invalid BitsPerSample value. BitPerSample on a colour continuous-tone picture (CT) RGB image should be 3</assert>
        </rule>
        <rule id="TIFF-IT-CT-RGB-0004" context="ifd[filetype=ct]" level="error">
            <title>TIFF/IT-CT InkSet is  forbidden for RGB image</title>
            <description>InkSet is forbidden on a colour continuous-tone picture (CT) in RGB </description>
            <reference>
                <section>Annex G: RGB colour-space data in TIFF/IT-CT</section><page>61</page>
            </reference>
            <assert test="{imgtype!='rgb'} || {!tags.tag[name=InkSet]}">InkSet is forbidden on a colour continuous-tone picture (CT) in RGB </assert>
        </rule>
        <rule id="TIFF-IT-CT-RGB-0005" context="ifd[filetype=ct]" level="error">
            <title>TIFF/IT-CT NumberOfInks is  forbidden for RGB image</title>
            <description>NumberOfInks is forbidden on a colour continuous-tone picture (CT) in RGB </description>
            <reference>
                <section>Annex G: RGB colour-space data in TIFF/IT-CT</section><page>61</page>
            </reference>
            <assert test="{imgtype!='rgb'} || {!tags.tag[name=NumberOfInks]}">NumberOfInks is forbidden on a colour continuous-tone picture (CT) in RGB </assert>
        </rule>
        <rule id="TIFF-IT-CT-RGB-0006" context="ifd[filetype=ct]" level="error">
            <title>TIFF/IT-CT DotRange is  forbidden for RGB image</title>
            <description>DotRange is forbidden on a colour continuous-tone picture (CT) in RGB </description>
            <reference>
                <section>Annex G: RGB colour-space data in TIFF/IT-CT</section><page>61</page>
            </reference>
            <assert test="{imgtype!='rgb'} || {!tags.tag[name=DotRange]}">DotRange is forbidden on a colour continuous-tone picture (CT) in RGB </assert>
        </rule>
        <rule id="TIFF-IT-CT-RGB-0007" context="ifd[filetype=ct]" level="error">
            <title>TIFF/IT-CT ColorSequence is  forbidden for RGB image</title>
            <description>ColorSequence is forbidden on a colour continuous-tone picture (CT) in RGB </description>
            <reference>
                <section>Annex G: RGB colour-space data in TIFF/IT-CT</section><page>61</page>
            </reference>
            <assert test="{imgtype!='rgb'} || {!tags.tag[name=ColorSequence]}">ColorSequence is forbidden on a colour continuous-tone picture (CT) in RGB </assert>
        </rule>
        <rule id="TIFF-IT-CT-RGB-0008" context="ifd[filetype=ct]" level="error">
            <title>TIFF/IT-CT IT8Header is  forbidden for RGB image</title>
            <description>IT8Header is forbidden on a colour continuous-tone picture (CT) in RGB </description>
            <reference>
                <section>Annex G: RGB colour-space data in TIFF/IT-CT</section><page>61</page>
            </reference>
            <assert test="{imgtype!='rgb'} || {!tags.tag[name=IT8Header]}">IT8Header is forbidden on a colour continuous-tone picture (CT) in RGB </assert>
        </rule>
        <rule id="TIFF-IT-CT-RGB-0009" context="ifd[filetype=ct]" level="error">
            <title>TIFF/IT-CT RasterPadding is  forbidden for RGB image</title>
            <description>RasterPadding is forbidden on a colour continuous-tone picture (CT) in RGB </description>
            <reference>
                <section>Annex G: RGB colour-space data in TIFF/IT-CT</section><page>61</page>
            </reference>
            <assert test="{imgtype!='rgb'} || {!tags.tag[name=RasterPadding]}">RasterPadding is forbidden on a colour continuous-tone picture (CT) in RGB </assert>
        </rule>
        <rule id="TIFF-IT-CT-RGB-0010" context="ifd[filetype=ct]" level="error">
            <title>TIFF/IT-CT PhotometricInterpretation valid value for RGB image</title>
            <description>PhotometricInterpretation valid values for colour continuous-tone picture (CT) is:
                2 = RGB. In the RGB model, a color is described as a combination of the three primary colors of light (red, green, and blue) in particular concentrations.
            </description>
            <reference>
                <section>Annex G: RGB colour-space data in TIFF/IT-CT</section><page>61</page>
            </reference>
            <assert test="{imgtype!='rgb'} || {tags.tag[name=PhotometricInterpretation] == 2}">Invalid PhotometricInterpretation value for colour continuous-tone picture (CT) RGB image</assert>
        </rule>
    </rules>

    <rules id="TIFF-IT-CT-CIELAB">
        <title>LAB colour space data in TIFF/IT CT</title>
        <description>Annex H defines a TIFF/IT-CT file format with a PhotometricInterpretation value of 8 which may be used for
            CT images with LAB colour space data. LAB shall be as defined in ISO 13655. The LAB image type belongs
            to TIFF-CT image type. For the LAB images or files, only a TIFF/IT conforming level is defined.

            In TIFF/IT-CT for the LAB colour space data, data area is specified by StripOffsets and StripByteCounts tag
            fields. Usage of multiple-data area for the LAB colour space data may be accepted. If multiple-data area is
            used, RowsPerStrip field shall be specified. Encoded pixel values in the TIFF/IT-CT for LAB signify colour
            space data described in 1976 CIE L*a*b*.
            The three formats of pixel interleaving, line interleaving and colour interleaving may be used for describing the
            pixel structure of the LAB colour space data. A TIFF/IT-CT writer that specifies a PhotometricInterpretation
            value of 8 shall write in any one of the formats. A TIFF/IT-CT reader that reads TIFF/IT-CT file with a
            PhotometricInterpretation value of 8 shall read all three of the formats.</description>

        <rule id="TIFF-IT-CT-CIELAB-0001" context="ifd[filetype=ct]" level="error" experimental="true">
            <title>TIFF/IT-CT BitsPerSample valid values for CIELab</title>
            <description>BitsPerSample on a colour continuous-tone picture (CT) CIELab image must be [8,8,8] or [16,16,16]</description>
            <reference>
                <section>Annex H: LAB colour space data in TIFF/IT CT</section><page>65</page>
            </reference>
            <assert test="{imgtype!='lab'} || {tags.tag[name=BitsPerSample] == '8,8,8'} || {tags.tag[name=BitsPerSample] == '16,16,16'}">Invalid BitsPerSample on a colour continuous-tone picture (CT) CIELab image. BitsPerSample value should be [8,8,8] or [16,16,16]</assert>
        </rule>
        <rule id="TIFF-IT-CT-CIELAB-0002" context="ifd[filetype=ct]" level="error">
            <title>TIFF/IT-CT Compression valid values for CIELab</title>
            <description>Compression valid values for colour continuous-tone picture (CT) are:
                1 = No compression
                7 = JPEG encoding scheme ('new-style' JPEG)
                8 = Deflate ('Adobe-style')</description>
            <reference>
                <section>Annex H: LAB colour space data in TIFF/IT CT</section><page>65</page>
            </reference>
            <assert test="{imgtype!='lab'} || {tags.tag[name=Compression] == 1} || {tags.tag[name=Compression] == 7} || {tags.tag[name=Compression] == 8}">Invalid Compression value for colour continuous-tone picture (CT) CIELab image</assert>
        </rule>
        <rule id="TIFF-IT-CT-CIELAB-0003" context="ifd[filetype=ct]" level="error">
            <title>TIFF/IT-CT SamplesPerPixel valid values for CIELab</title>
            <description>BitsPerSample on a colour continuous-tone picture (CT) CIELab image must be 3</description>
            <reference>
                <section>Annex H: LAB colour space data in TIFF/IT CT</section><page>65</page>
            </reference>
            <assert test="{imgtype!='lab'} || {tags.tag[name=SamplesPerPixel] == 3}">Invalid BitsPerSample value. BitPerSample on a colour continuous-tone picture (CT) CIELab image should be 3</assert>
        </rule>

        <rule id="TIFF-IT-CT-CIELAB-0004" context="ifd[filetype=ct]" level="error">
            <title>TIFF/IT-CT InkSet is  forbidden for CIELab image</title>
            <description>InkSet is forbidden on a colour continuous-tone picture (CT) in CIELab </description>
            <reference>
                <section>Annex H: LAB colour space data in TIFF/IT CT</section><page>65</page>
            </reference>
            <assert test="{imgtype!='lab'} || {!tags.tag[name=InkSet]}">InkSet is forbidden on a colour continuous-tone picture (CT) in CIELab </assert>
        </rule>
        <rule id="TIFF-IT-CT-CIELAB-0005" context="ifd[filetype=ct]" level="error">
            <title>TIFF/IT-CT NumberOfInks is  forbidden for CIELab image</title>
            <description>NumberOfInks is forbidden on a colour continuous-tone picture (CT) in CIELab </description>
            <reference>
                <section>Annex H: LAB colour space data in TIFF/IT CT</section><page>65</page>
            </reference>
            <assert test="{imgtype!='lab'} || {!tags.tag[name=NumberOfInks]}">NumberOfInks is forbidden on a colour continuous-tone picture (CT) in CIELab </assert>
        </rule>
        <rule id="TIFF-IT-CT-CIELAB-0006" context="ifd[filetype=ct]" level="error">
            <title>TIFF/IT-CT DotRange is  forbidden for CIELab image</title>
            <description>DotRange is forbidden on a colour continuous-tone picture (CT) in CIELab </description>
            <reference>
                <section>Annex H: LAB colour space data in TIFF/IT CT</section><page>65</page>
            </reference>
            <assert test="{imgtype!='lab'} || {!tags.tag[name=DotRange]}">DotRange is forbidden on a colour continuous-tone picture (CT) in CIELab </assert>
        </rule>
        <rule id="TIFF-IT-CT-CIELAB-0007" context="ifd[filetype=ct]" level="error">
            <title>TIFF/IT-CT ColorSequence is  forbidden for CIELab image</title>
            <description>ColorSequence is forbidden on a colour continuous-tone picture (CT) in CIELab </description>
            <reference>
                <section>Annex H: LAB colour space data in TIFF/IT CT</section><page>65</page>
            </reference>
            <assert test="{imgtype!='lab'} || {!tags.tag[name=ColorSequence]}">ColorSequence is forbidden on a colour continuous-tone picture (CT) in CIELab </assert>
        </rule>
        <rule id="TIFF-IT-CT-CIELAB-0008" context="ifd[filetype=ct]" level="error">
            <title>TIFF/IT-CT IT8Header is  forbidden for CIELab image</title>
            <description>IT8Header is forbidden on a colour continuous-tone picture (CT) in CIELab </description>
            <reference>
                <section>Annex H: LAB colour space data in TIFF/IT CT</section><page>65</page>
            </reference>
            <assert test="{imgtype!='lab'} || {!tags.tag[name=IT8Header]}">IT8Header is forbidden on a colour continuous-tone picture (CT) in CIELab </assert>
        </rule>
        <rule id="TIFF-IT-CT-CIELAB-0009" context="ifd[filetype=ct]" level="error">
            <title>TIFF/IT-CT RasterPadding is  forbidden for CIELab image</title>
            <description>RasterPadding is forbidden on a colour continuous-tone picture (CT) in CIELab </description>
            <reference>
                <section>Annex H: LAB colour space data in TIFF/IT CT</section><page>65</page>
            </reference>
            <assert test="{imgtype!='lab'} || {!tags.tag[name=RasterPadding]}">RasterPadding is forbidden on a colour continuous-tone picture (CT) in CIELab </assert>
        </rule>
        <rule id="TIFF-IT-CT-CIELAB-0010" context="ifd[filetype=ct]" level="error">
            <title>TIFF/IT-CT ColorCharacterization is  forbidden for CIELab image</title>
            <description>ColorCharacterization is forbidden on a colour continuous-tone picture (CT) in CIELab</description>
            <reference>
                <section>Annex H: LAB colour space data in TIFF/IT CT</section><page>65</page>
            </reference>
            <assert test="{imgtype!='lab'} || {!tags.tag[name=ColorCharacterization]}">ColorCharacterization is forbidden on a colour continuous-tone picture (CT) in CIELab</assert>
        </rule>
        <rule id="TIFF-IT-CIELAB-0011" context="ifd[filetype=ct]" level="error">
            <title>TIFF/IT-CT PhotometricInterpretation valid value for  CIELab image</title>
            <description>PhotometricInterpretation valid values for colour continuous-tone picture (CT) is:
                8 = CIE L*a*b*.
            </description>
            <reference>
                <section>Annex H: LAB colour space data in TIFF/IT CT</section><page>65</page>
            </reference>
            <assert test="{imgtype!='lab'} || {tags.tag[name=PhotometricInterpretation] == 8}">Invalid PhotometricInterpretation value for colour continuous-tone picture (CT) CIELab image</assert>
        </rule>
    </rules>

    <rules id="TIFF-IT-LW">
        <title>Colour line-art (LW) file</title>
        <description>Colour line-art data consists of an image file comprised of the following three parts.The first part consists of
            one or more blocks of run-length encoded data describing the colour line-art image in terms of colour numbers
            and run lengths.The second part is a colour table (in the IFD) that defines the colour values for the colour
            numbers of the first part.The third part is a table describing the separations of the second part.This data
            structure is similar to binary line-art data with the addition of two colour tables for colour specification.

            TIFF/IT-LW makes use of all the features and functionality supported by the TIFF and TIFF/IT fields
            appropriate to line-art images

            NOTE TIFF/IT-LW files are not readable by typical TIFF 6.0 readers and cannot be written by typical TIFF 6.0 writers
            because of the mandatory use of TIFF/IT-specific fields and values and non-traditional interpretations of other TIFF 6.0
            fields and values (e.g. compression by mandatory run length encoding).
        </description>

        <rule id="TIFF-IT-LW-0001" context="ifd[filetype=lw]" level="error" experimental="true">
            <title>TIFF/IT-LW BitsPerSample valid cardinality</title>
            <description>BitsPerSample cardinality on a Colour line-art picture (LW) file must be SamplesPerPixel SamplesPerPixel * 4</description>
            <reference>
                <section>Section 7.4.3: TIFF/IT-LW, TIFF/IT-LW/P1 and TIFF/IT-LW/P2 encoding</section><page>31</page>
            </reference>
            <assert test="{tags.tag[name=BitsPerSample].cardinality == tags.tag[name=SamplesPerPixel]*4}">Invalid BitsPerSample cardinality. BitsPerSample cardinality on a Colour line-art picture (LW) file must be SamplesPerPixel SamplesPerPixel * 4</assert>
        </rule>
        <rule id="TIFF-IT-LW-0002" context="ifd[filetype=lw]" level="error">
            <title>TIFF/IT-LW Compression valid value</title>
            <description>Compression value on a Colour line-art picture (LW) picture must be IT8 Linework RLE (32896)</description>
            <reference>
                <section>Section 7.4.3: TIFF/IT-LW, TIFF/IT-LW/P1 and TIFF/IT-LW/P2 encoding</section><page>31</page>
            </reference>
            <assert test="{tags.tag[name=Compression] == 32896}">Invalid Compression value, Compression should be  IT8 Linework RLE (32896)</assert>
        </rule>
        <rule id="TIFF-IT-LW-0003" context="ifd[filetype=lw]" level="error">
            <title>TIFF/IT-LW PhotometricInterpretation valid value </title>
            <description>PhotometricInterpretation value on a Colour line-art picture (LW) picture must be CMYK (5)</description>
            <reference>
                <section>Section 7.4.3: TIFF/IT-LW, TIFF/IT-LW/P1 and TIFF/IT-LW/P2 encoding</section><page>31</page>
            </reference>
            <assert test="{tags.tag[name=PhotometricInterpretation] == 5}">Invalid PhotometricInterpretation value, PhotometricInterpretation should be CMYK (5)</assert>
        </rule>
        <rule id="TIFF-IT-LW-0004" context="ifd[filetype=lw]" level="error">
            <title>TIFF/IT-LW SamplesPerPixel valid value </title>
            <description>SamplesPerPixel value on a Colour line-art picture (LW) picture must be 1</description>
            <reference>
                <section>Section 7.4.3: TIFF/IT-LW, TIFF/IT-LW/P1 and TIFF/IT-LW/P2 encoding</section><page>31</page>
            </reference>
            <assert test="{tags.tag[name=SamplesPerPixel] == 1}">Invalid SamplesPerPixel value, SamplesPerPixel should be 1</assert>
        </rule>
        <rule id="TIFF-IT-LW-0005" context="ifd[filetype=lw]" level="error">
            <title>TIFF/IT-LW ColorSequence valid value</title>
            <description>ColorSequence on a colour ine-art picture (LW) file must be CMYK or YMCK</description>
            <reference>
                <section>Section 7.4.3: TIFF/IT-LW, TIFF/IT-LW/P1 and TIFF/IT-LW/P2 encoding</section><page>31</page>
            </reference>
            <assert test="{tags.tag[name=ColorSequence] == 'CMYK'} || {tags.tag[name=ColorSequence] == 'YMCK'}">Invalid ColorSequence value. ColorSequence on a colour ine-art picture (LW) file must be CMYK or YMCK</assert>
        </rule>
        <rule id="TIFF-IT-LW-0006" context="ifd[filetype=lw]" level="error">
            <title>TIFF/IT-LW BitsPerRunLength valid value</title>
            <description>BitsPerRunLength on a colour ine-art picture (LW) file must be 16</description>
            <reference>
                <section>Section 7.4.3: TIFF/IT-LW, TIFF/IT-LW/P1 and TIFF/IT-LW/P2 encoding</section><page>31</page>
            </reference>
            <assert test="{tags.tag[name=BitsPerRunLength] == 16}">Invalid BitsPerRunLength value. BitsPerRunLength on a colour ine-art picture (LW) file must be 16</assert>
        </rule>
        <rule id="TIFF-IT-LW-0007" context="ifd[filetype=lw]" level="error">
            <title>TIFF/IT-LW ColorTable is mandatory</title>
            <description>ColorTable is mandatory for on a Colour line-art picture (LW) TIFF/IT1</description>
            <reference>
                <section>Section 7.3.3: TIFF/IT-CT encoding</section><page>23</page>
            </reference>
            <assert test="{tags.tag[name=ColorTable]}">ColorTable is mandatory for on a Colour line-art picture (LW) TIFF/IT</assert>
        </rule>
        <rule id="TIFF-IT-LW-0008" context="ifd[filetype=lw]" level="error">
            <title>TIFF/IT-LW NumberOfInks match SamplesPerPixel</title>
            <description>If NumberOfInks tag is used, it must have the same value as the value of SamplesPerPixel</description>
            <reference>
                <section>Section 7.4.3: TIFF/IT-LW, TIFF/IT-LW/P1 and TIFF/IT-LW/P2 encoding</section><page>31</page>
            </reference>
            <assert test="{tags.tag[name=NumberOfInks] == tags.tag[name=SamplesPerPixel]}">Invalid NumberOfInks. If NumberOfInks tag is used, it must have the same value as the value of SamplesPerPixel</assert>
        </rule>
        <rule id="TIFF-IT-LW-0009" context="ifd[filetype=lw]" level="error" experimental="true">
            <title>TIFF/IT-LW InkSet match ColorSequence</title>
            <description>If InkSet tag is used and ColorSequence tag value is the default value of 'CMYK', InkSet shall have the value of 1. Otherwise, it shall have the value of 2.</description>
            <reference>
                <section>Section 7.4.3: TIFF/IT-LW, TIFF/IT-LW/P1 and TIFF/IT-LW/P2 encoding</section><page>31</page>
            </reference>
            <assert test="{!tags.tag[name=InkSet]} || {tags.tag[name=InkSet]!=1} || {!tags.tag[name=ColorSequence]} || {tags.tag[name=ColorSequence]=='CMYK'}">Inkset value not match with ColorSequence value.</assert>
        </rule>
    </rules>

    <rules id="TIFF-IT-HC">
        <title>High-resolution continuous-tone (HC) file</title>
        <description>High-resolution continuous-tone data consist of an image file of one or more blocks of run-length encoded
            pixel data. The number of lines is defined in the ImageLength field. Each line is made up of pixel runs and
            starts and ends with a blank pixel run (all zero bytes). Each pixel run is made up of two components: a run
            length followed by a colour value. The run length is a 16-bit integer as defined in 7.4.2.4.2. The big-endian
            byte order is used regardless of the order used in the TIFF/IT directories (IFD). The sum of the run lengths in
            the line shall be the value found in ImageWidth. Run lengths shall not cross line boundaries. The colour value
            is defined by the values of SamplesPerPixel, BitsPerSample, ColorSequence and DotRange in the same
            manner that CT colour values are specified, except that a special case of colour value is reserved for a
            transparent colour, if used.

            TIFF/IT field 34028 is used as the transparency indicator. If transparency is used, colour values of zero
            become a special case, and signify transparency in that separation of the high-resolution continuous-tone
            (HC) data. Transparency indicates that the underlying colour picture separation value is used.

            TIFF/IT-HC makes use of all the features and functionality supported by the TIFF and TIFF/IT fields
            appropriate to high-resolution continuous-tone images.

            NOTE TIFF/IT-HC is not readable by typical TIFF 6.0 readers and cannot
            be written by typical TIFF 6.0 writers because of the mandatory use of TIFF/IT-specific fields and values and nontraditional
            interpretations of other TIFF 6.0 fields and values (e.g. compression by mandatory run-length encoding).
        </description>
        <rule id="TIFF-IT-HC-0001" context="ifd[filetype=hc]" level="error" experimental="true">
            <title>TIFF/IT-HC BitsPerSample valid values</title>
            <description>BitsPerSample on a  High-resolution continuous-tone data (HC) file without InkSet tag must be [8,8,8,8]</description>
            <reference>
                <section>Section 7.5.3: TIFF/IT-HC, TIFF/IT-HC/P1 and TIFF/IT-HC/P2 encoding</section><page>34</page>
            </reference>
            <assert test="tags.tag[name=InkSet]} || {tags.tag[name=InkSet] != 2} || {tags.tag[name=BitsPerSample] == '8,8,8,8'}">Invalid BitsPerSample value. BitsPerSample should be [8,8,8,8]</assert>
        </rule>
        <rule id="TIFF-IT-HC-0002" context="ifd[filetype=hc]" level="error">
            <title>TIFF/IT-HC Compression valid value </title>
            <description>Compression valid values for High-resolution continuous-tone data (HC) is IT8MP Run-length encoding, used with HC format (32897)</description>
            <reference>
                <section>Section 7.5.3: TIFF/IT-HC, TIFF/IT-HC/P1 and TIFF/IT-HC/P2 encoding</section><page>34</page>
            </reference>
            <assert test="{tags.tag[name=Compression] == 32897}">Invalid Compression. Compression for High-resolution continuous-tone data should be IT8MP Run-length encoding (32897)</assert>
        </rule>
        <rule id="TIFF-IT-HC-0003" context="ifd[filetype=hc]" level="error">
            <title>TIFF/IT-HC PhotometricInterpretation valid value</title>
            <description>PhotometricInterpretation valid value for High-resolution continuous-tone data (HC) is CMYK (5)</description>
            <reference>
                <section>Section 7.5.3: TIFF/IT-HC, TIFF/IT-HC/P1 and TIFF/IT-HC/P2 encoding</section><page>34</page>
            </reference>
            <assert test="{tags.tag[name=PhotometricInterpretation] == 5}">Invalid PhotometricInterpretation value, PhotometricInterpretation should be CMYK (5)</assert>
        </rule>
        <rule id="TIFF-IT-HC-0004" context="ifd[filetype=hc]" level="error">
            <title>TIFF/IT-HC SamplesPerPixel valid values</title>
            <description>SamplesPerPixel for colour continuous-tone picture (CT) CMYK image without InkSet tag should be 4</description>
            <reference>
                <section>Section 7.5.3: TIFF/IT-HC, TIFF/IT-HC/P1 and TIFF/IT-HC/P2 encoding</section><page>34</page>
            </reference>
            <assert test="{tags.tag[name=InkSet]} || {tags.tag[name=InkSet] != 2} || {tags.tag[name=SamplesPerPixel] == 4}">Invalid SamplesPerPixel. SamplesPerPixel for colour continuous-tone picture (CT) CMYK image without InkSet tag should be 4</assert>
        </rule>
        <rule id="TIFF-IT-HC-0005" context="ifd[filetype=hc]]" level="error">
            <title>TIFF/IT-HC PlanarConfiguration valid value</title>
            <description>PlanarConfiguration  for a High-resolution continuous-tone data (HC) must be 1</description>
            <reference>
                <section>Section 7.5.3: TIFF/IT-HC, TIFF/IT-HC/P1 and TIFF/IT-HC/P2 encoding</section><page>34</page>
            </reference>
            <assert test="{tags.tag[name=PlanarConfiguration] == 1}">Invalid PlanarConfiguration. PlanarConfiguration for a High-resolution continuous-tone data (HC) should be 1</assert>
        </rule>
        <rule id="TIFF-IT-HC-0006" context="ifd[filetype=hc]" level="error">
            <title>TIFF/IT-HC NumberOfInks match SamplesPerPixel</title>
            <description>If NumberOfInks tag is used, it must have the same value as the value of SamplesPerPixel</description>
            <reference>
                <section>Section 7.5.3: TIFF/IT-HC, TIFF/IT-HC/P1 and TIFF/IT-HC/P2 encoding</section><page>34</page>
            </reference>
            <assert test="{tags.tag[name=NumberOfInks] == tags.tag[name=SamplesPerPixel]}">Invalid NumberOfInks. If NumberOfInks tag is used, it must have the same value as the value of SamplesPerPixel</assert>
        </rule>
        <rule id="TIFF-IT-HC-0007" context="ifd[filetype=hc]" level="error">
            <title>TIFF/IT-HC ColorSequence valid value</title>
            <description>ColorSequence for a High-resolution continuous-tone data (HC) must be CMYK or YMCK</description>
            <reference>
                <section>Section 7.5.3: TIFF/IT-HC, TIFF/IT-HC/P1 and TIFF/IT-HC/P2 encoding</section><page>34</page>
            </reference>
            <assert test="{tags.tag[name=ColorSequence] == 'CMYK'} || {tags.tag[name=ColorSequence] == 'YMCK'}">Invalid ColorSequence value. ColorSequence for a High-resolution continuous-tone data (HC) must be CMYK or YMCK</assert>
        </rule>
    </rules>

    <rules id="TIFF-IT-MP">
        <title>Monochrome continuous-tone picture (MP) file</title>
        <description>
            The image-colour values for a pixel are obtained by combining the colour values for each of the colour
            components with the pixel-intensity values in the data stream. This applies to foreground colours only.
            Monochrome continuous-tone pictures do not have background-colour specifications.The scaling of these
            intensity values is linear with respect to printing-dot percent.

            TIFF/IT-MP makes use of all the features and functionality supported by the TIFF and TIFF/IT fields
            appropriate to monochrome continuous-tone picture images.
        </description>
        <rule id="TIFF-IT-MP-0001" context="ifd[filetype=mp]" level="error">
            <title>TIFF/IT-MP BitsPerSample valid values</title>
            <description>BitsPerSample on a Monochrome continuous-tone picture (MP) file must be 8 or 16</description>
            <reference>
                <section>Section 7.6.3: TIFF/IT-MP, TIFF/IT-MP/P1 and TIFF/IT-MP/P2 encoding</section><page>36</page>
            </reference>
            <assert test="tags.tag[name=BitsPerSample] == 8} || {tags.tag[name=BitsPerSample] == 16}">Invalid BitsPerSample value. BitsPerSample should be 8 or 16</assert>
        </rule>
        <rule id="TIFF-IT-MP-0002" context="ifd[filetype=mp]" level="error">
            <title>TIFF/IT-MP Compression valid values </title>
            <description>Compression valid values for Monochrome continuous-tone picture (MP) file are:
                1 = No compression
                7 = JPEG ('new-style' JPEG)
                8 = Deflate ('Adobe-style')
                32895 = IT8CTPAD</description>
            <reference>
                <section>Section 7.6.3: TIFF/IT-MP, TIFF/IT-MP/P1 and TIFF/IT-MP/P2 encoding</section><page>36</page>
            </reference>
            <assert test="{tags.tag[name=Compression] == 1} || {tags.tag[name=Compression] == 7} || {tags.tag[name=Compression] == 8} || {tags.tag[name=Compression] == 32895}">Invalid Compression for Monochrome continuous-tone picture (MP) file</assert>
        </rule>
        <rule id="TIFF-IT-MP-0003" context="ifd[filetype=mp]" level="error">
            <title>TIFF/IT-MP PhotometricInterpretation valid values</title>
            <description>PhotometricInterpretation valid value for  Monochrome continuous-tone picture (MP) are WhiteIsZero (0) and BlackIsZero (1)</description>
            <reference>
                <section>Section 7.6.3: TIFF/IT-MP, TIFF/IT-MP/P1 and TIFF/IT-MP/P2 encoding</section><page>36</page>
            </reference>
            <assert test="{tags.tag[name=PhotometricInterpretation] == 0} || {tags.tag[name=PhotometricInterpretation] == 1}">Invalid PhotometricInterpretation value, PhotometricInterpretation should be  WhiteIsZero (0) or BlackIsZero (1)</assert>
        </rule>
        <rule id="TIFF-IT-MP-0004" context="ifd[filetype=mp]" level="error">
            <title>TIFF/IT-MP SamplesPerPixel valid value</title>
            <description>SamplesPerPixel for Monochrome continuous-tone picture (MP) should be 1</description>
            <reference>
                <section>Section 7.6.3: TIFF/IT-MP, TIFF/IT-MP/P1 and TIFF/IT-MP/P2 encoding</section><page>36</page>
            </reference>
            <assert test="{tags.tag[name=SamplesPerPixel] == 1}">Invalid SamplesPerPixel. SamplesPerPixel for  Monochrome continuous-tone picture (MP) should be 1</assert>
        </rule>
        <rule id="TIFF-IT-MP-0005" context="ifd[filetype=mp]" level="error">
            <title>TIFF/IT-MP ColorSequence valid value</title>
            <description>ColorSequence for a for Monochrome continuous-tone picture (MP) must be CMYK or YMCK</description>
            <reference>
                <section>Section 7.6.3: TIFF/IT-MP, TIFF/IT-MP/P1 and TIFF/IT-MP/P2 encoding</section><page>36</page>
            </reference>
            <assert test="{tags.tag[name=ColorSequence] == 'CMYK'} || {tags.tag[name=ColorSequence] == 'YMCK'}">Invalid ColorSequence value. ColorSequence for a Monochrome continuous-tone picture (MP) must be CMYK or YMCK</assert>
        </rule>
        <rule id="TIFF-IT-MP-0006" context="ifd[filetype=mp]" level="error">
            <title>TIFF/IT-MP RasterPadding IT8CTPAD compression</title>
            <description>If RasterPadding is used in Monochrome continuous-tone picture (MP) file, then Compression value must be specified as 32895. </description>
            <reference>
                <section>Section 7.6.3: TIFF/IT-MP, TIFF/IT-MP/P1 and TIFF/IT-MP/P2 encoding</section><page>36</page>
            </reference>
            <assert test="{!tags.tag[name=RasterPadding]} || {tags.tag[name=Compression] == 32895}">Invalid Compression value. If RasterPadding is used in Monochrome continuous-tone picture (MP) file, then Compression value must be specified as 32895.</assert>
        </rule>
        <rule id="TIFF-IT-MP-0007" context="ifd[filetype=mp]" level="error">
            <title>TIFF/IT-MP ImageColorValue mandatory</title>
            <description>In a Monochrome continuous-tone picture (MP) file If ImageColorIndicator value is 1, ImageColorValue is mandatory. </description>
            <reference>
                <section>Section 7.6.3: TIFF/IT-MP, TIFF/IT-MP/P1 and TIFF/IT-MP/P2 encoding</section><page>36</page>
            </reference>
            <assert test="{tags.tag[name=ImageColorIndicator]!=1} || {tags.tag[name=ImageColorValue]}">ImageColorValue is mandatory. If ImageColorIndicator is 1 in Monochrome continuous-tone picture (MP) file.</assert>
        </rule>
        <rule id="TIFF-IT-MP-0008" context="ifd[filetype=mp]" level="error">
            <title>TIFF/IT-MP ImageColorValue forbidden</title>
            <description>In a Monochrome continuous-tone picture (MP) file If ImageColorIndicator value is 0, ImageColorValue is forbidden. </description>
            <reference>
                <section>Section 7.6.3: TIFF/IT-MP, TIFF/IT-MP/P1 and TIFF/IT-MP/P2 encoding</section><page>36</page>
            </reference>
            <assert test="{!tags.tag[name=ImageColorIndicator]} || {tags.tag[name=ImageColorIndicator]!=0} || {!tags.tag[name=ImageColorValue]}">ImageColorValue is forbidden if ImageColorIndicator is 0 in Monochrome continuous-tone picture (MP) file.</assert>
        </rule>
        <rule id="TIFF-IT-MP-0009" context="ifd[filetype=mp]" level="error">
            <title>TIFF/IT-MP ImageColorIndicator valid values</title>
            <description>In a Monochrome continuous-tone picture (MP) file ImageColorIndicator valid values are:
                0 = image/background colour not defined (default value);
                1 = image/background colour defined;</description>
            <reference>
                <section>Section 7.6.3: TIFF/IT-MP, TIFF/IT-MP/P1 and TIFF/IT-MP/P2 encoding</section><page>36</page>
            </reference>
            <assert test="{tags.tag[name=ImageColorIndicator] == 1}  || {tags.tag[name=ImageColorIndicator] == 0} ">Invalid ImageColorIndicator value. ImageColorIndicator in Monochrome continuous-tone picture (MP) file should be 0 or 1.</assert>
        </rule>
    </rules>

    <rules id="TIFF-IT-BP">
        <title>Binary picture (BP) file</title>
        <description>For binary pictures, ImageColorValue and BackgroundColorValue may contain the values of the colour
            components for the image (foreground) and background colour, specified in the sequence as defined in
            ColorSequence. These colour values apply to the solid image and background colours for binary pictures.
            The data stream indicates which of the colours, foreground and background, will print. The bits in the data
            stream function as a switch between the image colour and the background colour. Bitmap fill order is from
            most significant bit to least significant bit within the byte, the default TIFF fill order. ImageColorIndicator and
            BackgroundColorIndicator field values shall be used to indicate when, if, and how image and background
            colours are used, including the use of transparency.

            TIFF/IT-BP makes use of all the features and functionality supported by the TIFF and TIFF/IT fields
            appropriate to binary picture images.

            NOTE TIFF/IT-BP may not be readable by typical TIFF 6.0 readers and writers may not be able to write them
            because of TIFF/IT specific fields and values and non-traditional interpretations of other TIFF 6.0 fields and values.
        </description>

        <rule id="TIFF-IT-BP-0001" context="ifd[filetype=bp]" level="error">
            <title>TIFF/IT-BP BitsPerSample valid values</title>
            <description>BitsPerSample on a Binary picture (BP) file must be 1</description>
            <reference>
                <section>Section 7.7.3: TIFF/IT-BP, TIFF/IT-BP/P1 and TIFF/IT-BP/P2 encoding</section><page>38</page>
            </reference>
            <assert test="tags.tag[name=BitsPerSample] == 1}">Invalid BitsPerSample value. BitsPerSample should be 1</assert>
        </rule>
        <rule id="TIFF-IT-BP-0002" context="ifd[filetype=bp]" level="error">
            <title>TIFF/IT-BP Compression valid values </title>
            <description>Compression valid values for  Binary picture (BP) file are:
                1 = No compression
                4 = CCITT Group 4 fax encoding
                8 = Deflate ('Adobe-style')</description>
            <reference>
                <section>Section 7.7.3: TIFF/IT-BP, TIFF/IT-BP/P1 and TIFF/IT-BP/P2 encoding</section><page>38</page>
            </reference>
            <assert test="{tags.tag[name=Compression] == 1} || {tags.tag[name=Compression] == 4} || {tags.tag[name=Compression] == 8}">Invalid Compression for Binary picture (BP) file</assert>
        </rule>
        <rule id="TIFF-IT-BP-0003" context="ifd[filetype=bp]" level="error">
            <title>TIFF/IT-BP PhotometricInterpretation valid values</title>
            <description>PhotometricInterpretation valid value for Binary picture (BP) are WhiteIsZero (0) and BlackIsZero (1)</description>
            <reference>
                <section>Section 7.7.3: TIFF/IT-BP, TIFF/IT-BP/P1 and TIFF/IT-BP/P2 encoding</section><page>38</page>
            </reference>
            <assert test="{tags.tag[name=PhotometricInterpretation] == 0} || {tags.tag[name=PhotometricInterpretation] == 1}">Invalid PhotometricInterpretation value, PhotometricInterpretation should be  WhiteIsZero (0) or BlackIsZero (1)</assert>
        </rule>
        <rule id="TIFF-IT-BP-0004" context="ifd[filetype=bp]" level="error">
            <title>TIFF/IT-BP SamplesPerPixel valid value</title>
            <description>SamplesPerPixel for Binary picture (BP) should be 1</description>
            <reference>
                <section>Section 7.7.3: TIFF/IT-BP, TIFF/IT-BP/P1 and TIFF/IT-BP/P2 encoding</section><page>38</page>
            </reference>
            <assert test="{tags.tag[name=SamplesPerPixel] == 1}">Invalid SamplesPerPixel. SamplesPerPixel for Binary picture (BP) should be 1</assert>
        </rule>
        <rule id="TIFF-IT-BP-0005" context="ifd[filetype=bp]" level="error">
            <title>TIFF/IT-BP ColorSequence valid value</title>
            <description>ColorSequence for a Binary picture (BP) must be CMYK or YMCK</description>
            <reference>
                <section>Section 7.7.3: TIFF/IT-BP, TIFF/IT-BP/P1 and TIFF/IT-BP/P2 encoding</section><page>38</page>
            </reference>
            <assert test="{tags.tag[name=ColorSequence] == 'CMYK'} || {tags.tag[name=ColorSequence] == 'YMCK'}">Invalid ColorSequence value. ColorSequence for Monochrome  Binary picture (BP) must be CMYK or YMCK</assert>
        </rule>
        <rule id="TIFF-IT-BP-0006" context="ifd[filetype=bp]" level="error">
            <title>TIFF/IT-BP ImageColorValue mandatory</title>
            <description>In a  Binary picture (BP) file If ImageColorIndicator value is 1, ImageColorValue is mandatory. </description>
            <reference>
                <section>Section 7.7.3: TIFF/IT-BP, TIFF/IT-BP/P1 and TIFF/IT-BP/P2 encoding</section><page>38</page>
            </reference>
            <assert test="{tags.tag[name=ImageColorIndicator]!=1} || {tags.tag[name=ImageColorValue]}">ImageColorValue is mandatory. If ImageColorIndicator is 1 in Binary picture (BP) file.</assert>
        </rule>
        <rule id="TIFF-IT-BP-0007" context="ifd[filetype=bp]" level="error">
            <title>TIFF/IT-BP ImageColorValue forbidden</title>
            <description>In a  Binary picture (BP) file If ImageColorIndicator value is 0, ImageColorValue is forbidden. </description>
            <reference>
                <section>Section 7.5.3: TIFF/IT-HC, TIFF/IT-HC/P1 and TIFF/IT-HC/P2 encoding</section><page>34</page>
            </reference>
            <assert test="{!tags.tag[name=ImageColorIndicator]} || {tags.tag[name=ImageColorIndicator]!=0} || {!tags.tag[name=ImageColorValue]}">ImageColorValue is forbidden if ImageColorIndicator is 0 in Binary picture (BP) file.</assert>
        </rule>
        <rule id="TIFF-IT-BP-0008" context="ifd[filetype=bp]" level="error">
            <title>TIFF/IT-BP BackgroundColorValue mandatory</title>
            <description>In a  Binary picture (BP) file If BackgroundColorIndicator value is 1, BackgroundColorValue is mandatory. </description>
            <reference>
                <section>Section 7.7.3: TIFF/IT-BP, TIFF/IT-BP/P1 and TIFF/IT-BP/P2 encoding</section><page>38</page>
            </reference>
            <assert test="{tags.tag[name=BackgroundColorIndicator]!=1} || {tags.tag[name=BackgroundColorValue]}">BackgroundColorValue is mandatory. If BackgroundColorIndicator is 1 in Binary picture (BP) file.</assert>
        </rule>
        <rule id="TIFF-IT-BP-0009" context="ifd[filetype=bp]" level="error">
            <title>TIFF/IT-BP BackgroundColorValue forbidden</title>
            <description>In a  Binary picture (BP) file If BackgroundColorIndicator value is 0, BackgroundColorValue is forbidden. </description>
            <reference>
                <section>Section 7.7.3: TIFF/IT-BP, TIFF/IT-BP/P1 and TIFF/IT-BP/P2 encoding</section><page>38</page>
            </reference>
            <assert test="{!tags.tag[name=BackgroundColorIndicator] || {tags.tag[name=BackgroundColorIndicator]!=0} || {!tags.tag[name=BackgroundColorValue]}">BackgroundColorValue is forbidden if BackgroundColorIndicator is 0 in Binary picture (BP) file.</assert>
        </rule>
    </rules>

    <rules id="TIFF-IT-BL">
        <title>Binary line-art (BL) file</title>
        <description>Each line of data shall be encoded as a sequence of pairs of background and image run lengths. Each new
            scan line shall start with a background run. In the case where a continuous background or an image section of
            a scan line has to be encoded by more than one run length pair, a zero run-length of the “opposite” colour
            shall be inserted.
            For binary line-art, the data stream indicates which of the colours, foreground or background, will print. The
            decoded run lengths of the data stream function as a switch between the image (foreground) colour and the
            background colour.

            TIFF/IT-BL makes use of all the features and functionality supported by the TIFF and TIFF/IT fields
            appropriate to binary line-art images.

            NOTE TIFF/IT-BL files are not readable by typical TIFF 6.0 readers and neither can be written
            by typical TIFF 6.0 writers because of the mandatory use of TIFF/IT-specific fields and values, and non-traditional
            interpretations of other TIFF 6.0 fields and values (e.g., compression by mandatory run length encoding). It is possible to
            write filters for DTP applications that need to read and write TIFF/IT-BL files. </description>

        <rule id="TIFF-IT-BL-0001" context="ifd[filetype=bl]" level="error">
            <title>TIFF/IT-BL BitsPerSample valid values</title>
            <description>BitsPerSample on a Binary line-art (BL) file must be 1</description>
            <reference>
                <section>Section 7.8.3: TIFF/IT-BL and TIFF/IT-BL/P1 encoding</section><page>41</page>
            </reference>
            <assert test="tags.tag[name=BitsPerSample] == 1}">Invalid BitsPerSample value. BitsPerSample should be 1</assert>
        </rule>
        <rule id="TIFF-IT-BL-0002" context="ifd[filetype=bl]" level="error">
            <title>TIFF/IT-BL Compression valid values </title>
            <description>Compression valid value on a Binary line-art (BL) is:
                32895 = IT8CTPAD</description>
            <reference>
                <section>Section 7.8.3: TIFF/IT-BL and TIFF/IT-BL/P1 encoding</section><page>41</page>
            </reference>
            <assert test="{tags.tag[name=Compression] == 32895}">Invalid Compression on a Binary line-art (BL) file. compression should be IT8CTPAD</assert>
        </rule>
        <rule id="TIFF-IT-BL-0003" context="ifd[filetype=bl]" level="error">
            <title>TIFF/IT-BL PhotometricInterpretation valid values</title>
            <description>PhotometricInterpretation valid value on a Binary line-art (BL) are WhiteIsZero (0) and BlackIsZero (1)</description>
            <reference>
                <section>Section 7.8.3: TIFF/IT-BL and TIFF/IT-BL/P1 encoding</section><page>41</page>
            </reference>
            <assert test="{tags.tag[name=PhotometricInterpretation] == 0} || {tags.tag[name=PhotometricInterpretation] == 1}">Invalid PhotometricInterpretation value, PhotometricInterpretation should be  WhiteIsZero (0) or BlackIsZero (1)</assert>
        </rule>
        <rule id="TIFF-IT-BL-0004" context="ifd[filetype=bl]" level="error">
            <title>TIFF/IT-BL SamplesPerPixel valid value</title>
            <description>SamplesPerPixel on a Binary line-art (BL) should be 1</description>
            <reference>
                <section>Section 7.8.3: TIFF/IT-BL and TIFF/IT-BL/P1 encoding</section><page>41</page>
            </reference>
            <assert test="{tags.tag[name=SamplesPerPixel] == 1}">Invalid SamplesPerPixel. SamplesPerPixel on a Binary line-art (BL) should be 1</assert>
        </rule>
        <rule id="TIFF-IT-BL-0005" context="ifd[filetype=bl]" level="error">
            <title>TIFF/IT-BL ColorSequence valid value</title>
            <description>ColorSequence on a Binary line-art (BL) must be CMYK or YMCK</description>
            <reference>
                <section>Section 7.8.3: TIFF/IT-BL and TIFF/IT-BL/P1 encoding</section><page>41</page>
            </reference>
            <assert test="{tags.tag[name=ColorSequence] == 'CMYK'} || {tags.tag[name=ColorSequence] == 'YMCK'}">Invalid ColorSequence value. ColorSequence on a Binary line-art (BL) must be CMYK or YMCK</assert>
        </rule>
        <rule id="TIFF-IT-BL-0006" context="ifd[filetype=bl]" level="error">
            <title>TIFF/IT-BL ImageColorValue mandatory</title>
            <description>On a Binary line-art (BL) file If ImageColorIndicator value is 1, ImageColorValue is mandatory. </description>
            <reference>
                <section>Section 7.8.3: TIFF/IT-BL and TIFF/IT-BL/P1 encoding</section><page>41</page>
            </reference>
            <assert test="{tags.tag[name=ImageColorIndicator]!=1} || {tags.tag[name=ImageColorValue]}">ImageColorValue is mandatory. If ImageColorIndicator is 1 on a Binary line-art (BL) file.</assert>
        </rule>
        <rule id="TIFF-IT-BL-0007" context="ifd[filetype=bl]" level="error">
            <title>TIFF/IT-BL ImageColorValue forbidden</title>
            <description>On a Binary line-art (BL) file If ImageColorIndicator value is 0, ImageColorValue is forbidden. </description>
            <reference>
                <section>Section 7.8.3: TIFF/IT-BL and TIFF/IT-BL/P1 encoding</section><page>41</page>
            </reference>
            <assert test="{!tags.tag[name=ImageColorIndicator] || {tags.tag[name=ImageColorIndicator]!=0} || {!tags.tag[name=ImageColorValue]}">ImageColorValue is forbidden if ImageColorIndicator is 0 on a Binary line-art (BL) file.</assert>
        </rule>
        <rule id="TIFF-IT-BL-0008" context="ifd[filetype=bl]" level="error">
            <title>TIFF/IT-BL BackgroundColorValue mandatory</title>
            <description>On a Binary line-art (BL) file If BackgroundColorIndicator value is 1, BackgroundColorValue is mandatory. </description>
            <reference>
                <section>Section 7.8.3: TIFF/IT-BL and TIFF/IT-BL/P1 encoding</section><page>41</page>
            </reference>
            <assert test="{tags.tag[name=BackgroundColorIndicator]!=1} || {tags.tag[name=BackgroundColorValue]}">BackgroundColorValue is mandatory. If BackgroundColorIndicator is 1 on a Binary line-art (BL) file.</assert>
        </rule>
        <rule id="TIFF-IT-BL-0009" context="ifd[filetype=bl]" level="error">
            <title>TIFF/IT-BL BackgroundColorValue forbidden</title>
            <description>On a Binary line-art (BL) file If BackgroundColorIndicator value is 0, BackgroundColorValue is forbidden. </description>
            <reference>
                <section>Section 7.8.3: TIFF/IT-BL and TIFF/IT-BL/P1 encoding</section><page>41</page>
            </reference>
            <assert test="{!tags.tag[name=BackgroundColorIndicator] || {tags.tag[name=BackgroundColorIndicator]!=0} || {!tags.tag[name=BackgroundColorValue]}">BackgroundColorValue is forbidden if BackgroundColorIndicator is 0 on a Binary line-art (BL) file.</assert>
        </rule>
    </rules>

    <rules id="TIFF-IT-SD">
        <title>Screened data image (SD) file</title>
        <description>The pixel structure of screened data image files is described by colour interleaving (also called planar format).
            All lines of one colour (separation) are followed by all lines of the next colour. The order of planes of colour is
            defined by PhotometricInterpretation or ColorSequence.
            The data stream indicates whether or not a dot is intended to be imaged at a particular position. The bits in the
            data stream function as a switch between imaged and unimaged points. Bitmap fill order is from most
            significant bit to least significant bit within the byte, the default TIFF 6.0 fill order.

            TIFF/IT-SD makes use of all the features and functionality supported by the TIFF and TIFF/IT fields
            appropriate to prescreened (copydot) colour separation images.

            NOTE TIFF/IT-SD files are not readable by typical TIFF 6.0 readers and neither can be
            written by TIFF 6.0 writers because of the non-traditional interpretations of some TIFF 6.0 fields and values (e.g., the
            combination of PhotometricInterpretation and BitsPerSample). It is possible to write filters for DTP applications that need
            to read and write TIFF/IT-SD files.
        </description>

        <rule id="TIFF-IT-SD-0001" context="ifd[filetype=sd]" level="error">
            <title>TIFF/IT-SD BitsPerSample valid values</title>
            <description>BitsPerSample Screened data image (SD) file must be 1</description>
            <reference>
                <section>Section 7.9.3: TIFF/IT-SD and TIFF/IT-SD/P2 encoding</section><page>41</page>
            </reference>
            <assert test="tags.tag[name=BitsPerSample] == 1}">Invalid BitsPerSample value. BitsPerSample should be 1</assert>
        </rule>
        <rule id="TIFF-IT-SD-0002" context="ifd[filetype=sd]" level="error">
            <title>TIFF/IT-SD Compression valid values </title>
            <description>Compression valid values for Screened data image (SD) file are:
                1 = No compression
                4 = CCITT Group 4 fax encoding
                8 = Deflate ('Adobe-style')</description>
            <reference>
                <section>Section 7.9.3: TIFF/IT-SD and TIFF/IT-SD/P2 encoding</section><page>41</page>
            </reference>
            <assert test="{tags.tag[name=Compression] == 1} || {tags.tag[name=Compression] == 4} || {tags.tag[name=Compression] == 8}">Invalid Compression Screened data image (SD) file</assert>
        </rule>
        <rule id="TIFF-IT-SD-0003" context="ifd[filetype=sd]" level="error">
            <title>TIFF/IT-SD PhotometricInterpretation valid value</title>
            <description>PhotometricInterpretation valid value for Screened data image (SD) is CMYK (5)</description>
            <reference>
                <section>Section 7.9.3: TIFF/IT-SD and TIFF/IT-SD/P2 encoding</section><page>41</page>
            </reference>
            <assert test="{tags.tag[name=PhotometricInterpretation] == 5}">Invalid PhotometricInterpretation value, PhotometricInterpretation should be CMYK (5)</assert>
        </rule>
        <rule id="TIFF-IT-SD-0004" context="ifd[filetype=sd]" level="error">
            <title>TIFF/IT-SD SamplesPerPixel valid values</title>
            <description>SamplesPerPixel for Screened data image (SD) should be 1 or 4</description>
            <reference>
                <section>Section 7.9.3: TIFF/IT-SD and TIFF/IT-SD/P2 encoding</section><page>41</page>
            </reference>
            <assert test="{tags.tag[name=SamplesPerPixel] == 1} || {tags.tag[name=SamplesPerPixel] == 4}">Invalid SamplesPerPixel. SamplesPerPixel for Screened data image (SD) should be 1 or 4</assert>
        </rule>
        <rule id="TIFF-IT-SD-0005" context="ifd[filetype=sd]" level="error">
            <title>TIFF/IT-SD PlanarConfiguration valid value</title>
            <description>PlanarConfiguration for Screened data image (SD) should be 1 or 4</description>
            <reference>
                <section>Section 7.9.3: TIFF/IT-SD and TIFF/IT-SD/P2 encoding</section><page>41</page>
            </reference>
            <assert test="{tags.tag[name=PlanarConfiguration] == 2}">Invalid PlanarConfiguration. PlanarConfiguration for Screened data image (SD) should be 2</assert>
        </rule>
        <rule id="TIFF-IT-SD-0006" context="ifd[filetype=sd]" level="error">
            <title>TIFF/IT-SD InkSet valid values</title>
            <description>InkSet for a Screened data image (SD) file must be 1</description>
            <reference>
                <section>Section 7.9.3: TIFF/IT-SD and TIFF/IT-SD/P2 encoding</section><page>41</page>
            </reference>
            <assert test="{tags.tag[name=InkSet] == 1}">Invalid InkSet value. InkSet should be 1</assert>
        </rule>
        <rule id="TIFF-IT-SD-0007" context="ifd[filetype=sd]" level="error">
            <title>TIFF/IT-SD ColorSequence valid value</title>
            <description>ColorSequence for Screened data image (SD) must be CMYK or YMCK</description>
            <reference>
                <section>Section 7.9.3: TIFF/IT-SD and TIFF/IT-SD/P2 encoding</section><page>41</page>
            </reference>
            <assert test="{tags.tag[name=ColorSequence] == 'CMYK'} || {tags.tag[name=ColorSequence] == 'YMCK'}">Invalid ColorSequence value. ColorSequence for Screened data image (SD) must be CMYK or YMCK</assert>
        </rule>
    </rules>

    <rules id="TIFF-IT-FP">
        <title>Final page (FP) file</title>
        <description>Typically, a final page, ready for exposure on an output recorder, consists of more than one of the CT, MP, SD,
            LW, BL, BP and HC raster formats described in this International Standard. TIFF/IT-FP provides a mechanism
            for associating image files of the different types that make up a final page.

            By default, it is assumed that, for each image type, the page assembly processes have combined all the pageinput
            components of that data type into one output file: the single-component image file of that data type for
            the page, though this is a requirement only for both TIFF/IT-P1 and TIFF/IT-P2 conformance.

            The component-image files of a final page may be of any one of the TIFF/IT, TIFF/IT-P1, or TIFF/IT-P2
            conformance levels. The final page is considered to be TIFF/IT-P1-conformant only if all of its component files
            are TIFF/IT-P1-conformant and its own fields are TIFF/IT-FP/P1-conformant as specified in 7.10.2.5. The final
            page is considered to be TIFF/IT-P2-conformant only if all of its component files are TIFF/IT-P1- or
            TIFF/IT-P2-conformant and its own fields are TIFF/IT-FP/P2-conformant as specified in 7.10.2.5.</description>

        <rule id="TIFF-IT-FP-0001" context="ifd[filetype=fp]" level="error">
            <title>NewSubfileType valid value</title>
            <description>NewSubfileType on Final page (FP) file should be bigger than 7</description>
            <reference>
                <section>Section 7.10.3: TIFF/IT-FP, TIFF/IT-FP and TIFF/IT-FP/P2 encoding</section><page>48</page>
            </reference>
            <assert test="{tags.tag[name=NewSubfileType] &gt; 7}">Invalid NewSubfileType. NewSubfileType value on Final page (FP) file should be bigger than 7</assert>
        </rule>
        <rule id="TIFF-IT-FP-0002" context="ifd[filetype=fp]" level="error" experimental="true">
            <title>ImageWidth valid value</title>
            <description>ImageWidth on Final page (FP) file must be any  value  such that ImageWidth divided by XResolution equals the exact actual page width in ResolutionUnits.</description>
            <reference>
                <section>Section 7.10.3: TIFF/IT-FP, TIFF/IT-FP and TIFF/IT-FP/P2 encoding</section><page>48</page>
            </reference>
            <assert test="{tags.tag[name=ImageWidth] % {tags.tag[name=XResolution] == 0}">Invalid ImageWidth. ImageWidth value on Final page (FP)must be any  value  such that ImageWidth divided by XResolution equals the exact actual page width in ResolutionUnits</assert>
        </rule>
        <rule id="TIFF-IT-FP-0003" context="ifd[filetype=fp]" level="error" experimental="true">
            <title>ImageLength valid value</title>
            <description>ImageLength on Final page (FP) file must be any  value  such that ImageWidth divided by YResolution equals the exact actual page width in ResolutionUnits.</description>
            <reference>
                <section>Section 7.10.3: TIFF/IT-FP, TIFF/IT-FP and TIFF/IT-FP/P2 encoding</section><page>48</page>
            </reference>
            <assert test="{tags.tag[name=ImageLength] % {tags.tag[name=YResolution] == 0}">Invalid ImageLength. ImageLength value on Final page (FP)must be any  value  such that ImageLength divided by YResolution equals the exact actual page width in ResolutionUnits</assert>
        </rule>
        <rule id="TIFF-IT-FP-0004" context="ifd[filetype=fp]" level="error" experimental="true">
            <title>ImageDescription mandatory</title>
            <description>ImageDescription on Final page (FP) file is mandatory and must contain the name of the FP file at creation time, in order to facilitate identifying it in case of a subsequent rename.</description>
            <reference>
                <section>Section 7.10.3: TIFF/IT-FP, TIFF/IT-FP and TIFF/IT-FP/P2 encoding</section><page>48</page>
            </reference>
            <assert test="{tags.tag[name=ImageDescription]}">ImageDescription on Final page (FP) file is mandatory and must contain the name of the FP file at creation time, in order to facilitate identifying it in case of a subsequent rename</assert>
        </rule>
    </rules>

    <rules id="TIFF-IT-FP-IMAGE">
        <title>TIFF/IT-FP image-data encodings</title>
        <description>TIFF/IT-FP 0th IFD field usage for various low-resolution image-data encodings</description>

        <rule id="TIFF-IT-FP-IMAGE-0001" context="ifd[filetype=fp]" level="error" experimental="true">
            <title>Valid BitsPerSample on CMYK</title>
            <description>Valid BitsPerSample on TIFF/IT-FP 0th IFD field usage for CMYK low-resolution image-data encoding is [8,8,8,8]</description>
            <reference>
                <section>Section 7.10.3: TIFF/IT-FP, TIFF/IT-FP and TIFF/IT-FP/P2 encoding</section><page>48</page>
            </reference>
            <assert test="{type != 'CMYK'} || {tags.tag[name=BitsPerSample] == '8,8,8,8'}">Invalid BitsPerSample. BitsPerSample on TIFF/IT-FP 0th IFD field usage for CMYK low-resolution image-data encoding should be [8,8,8,8] </assert>
        </rule>
        <rule id="TIFF-IT-FP-IMAGE-0002" context="ifd[filetype=fp]" level="error">
            <title>Valid BitsPerSample on Palette colour</title>
            <description>Valid BitsPerSample on TIFF/IT-FP 0th IFD field usage for Palette colour low-resolution image-data encoding is 4 or 8</description>
            <reference>
                <section>Section 7.10.3: TIFF/IT-FP, TIFF/IT-FP and TIFF/IT-FP/P2 encoding</section><page>48</page>
            </reference>
            <assert test="{type != 'Palette'} || {tags.tag[name=BitsPerSample] == 8} || {tags.tag[name=BitsPerSample] == 4}" >Invalid BitsPerSample. BitsPerSample on TIFF/IT-FP 0th IFD field usage for Palette colour low-resolution image-data encoding should be 4 or 8 </assert>
        </rule>
        <rule id="TIFF-IT-FP-IMAGE-0003" context="ifd[filetype=fp]" level="error" experimental="true">
            <title>Valid BitsPerSample on RGB</title>
            <description>Valid BitsPerSample on TIFF/IT-FP 0th IFD field usage for RGB low-resolution image-data encoding is [8,8,8]</description>
            <reference>
                <section>Section 7.10.3: TIFF/IT-FP, TIFF/IT-FP and TIFF/IT-FP/P2 encoding</section><page>48</page>
            </reference>
            <assert test="{type != 'RGB'} || {tags.tag[name=BitsPerSample] == '8,8,8'}">Invalid BitsPerSample. BitsPerSample on TIFF/IT-FP 0th IFD field usage for RGB low-resolution image-data encoding should be [8,8,8] </assert>
        </rule>
        <rule id="TIFF-IT-FP-IMAGE-0004" context="ifd[filetype=fp]" level="error">
            <title>Valid BitsPerSample on Grayscale</title>
            <description>Valid BitsPerSample on TIFF/IT-FP 0th IFD field usage for Grayscale low-resolution image-data encoding is 4 or 8</description>
            <reference>
                <section>Section 7.10.3: TIFF/IT-FP, TIFF/IT-FP and TIFF/IT-FP/P2 encoding</section><page>48</page>
            </reference>
            <assert test="{type != 'Grayscale'} || {tags.tag[name=BitsPerSample] == 8} || {tags.tag[name=BitsPerSample] == 4}" >Invalid BitsPerSample. BitsPerSample on TIFF/IT-FP 0th IFD field usage for Grayscale low-resolution image-data encoding should be 4 or 8 </assert>
        </rule>
        <rule id="TIFF-IT-FP-IMAGE-0005" context="ifd[filetype=fp]" level="error">
            <title>forbidden BitsPerSample on Bilevel</title>
            <description>BitsPerSample is forbidden on TIFF/IT-FP 0th IFD field usage for Bilevel low-resolution image-data encoding</description>
            <reference>
                <section>Section 7.10.3: TIFF/IT-FP, TIFF/IT-FP and TIFF/IT-FP/P2 encoding</section><page>48</page>
            </reference>
            <assert test="{type != 'Bilevel'} || {!tags.tag[name=BitsPerSample]}" >BitsPerSample is forbidden on TIFF/IT-FP 0th IFD field usage for Bilevel low-resolution image-data encoding</assert>
        </rule>
        <rule id="TIFF-IT-FP-IMAGE-0006" context="ifd[filetype=fp]" level="error">
            <title>Valid Compression</title>
            <description>Valid Compression values on TIFF/IT-FP 0th IFD field usage for various low-resolution image-data encoding are:
                1 = No compression
                8 = Deflate ('Adobe-style')
                32773 = PACKBITS </description>
            <reference>
                <section>Section 7.10.3: TIFF/IT-FP, TIFF/IT-FP and TIFF/IT-FP/P2 encoding</section><page>48</page>
            </reference>
            <assert test="{tags.tag[name=Compression] == 1} || {tags.tag[name=Compression] == 8} || {tags.tag[name=Compression] == 32773}">Invalid Compression on TIFF/IT-FP 0th IFD field usage for various low-resolution image-data encoding</assert>
        </rule>
        <rule id="TIFF-IT-FP-IMAGE-0007" context="ifd[filetype=fp]" level="error">
            <title>Valid PhotometricInterpretation</title>
            <description>Valid PhotometricInterpretation values on TIFF/IT-FP 0th IFD field usage for various low-resolution image-data encoding are:
                0 = WhiteIsZero. For bilevel and grayscale images: 0 is imaged as white.
                1 = BlackIsZero. For bilevel and grayscale images: 0 is imaged as black.
                2 = RGB. RGB value of (0,0,0) represents black, and (255,255,255) represents white, assuming 8-bit components.
                3 = Palette color. In this model, a color is described with a single component.
                5 = Seperated, usually CMYK. </description>
            <reference>
                <section>Section 7.10.3: TIFF/IT-FP, TIFF/IT-FP and TIFF/IT-FP/P2 encoding</section><page>48</page>
            </reference>
            <assert test="{tags.tag[name=PhotometricInterpretation] == 0} || {tags.tag[name=PhotometricInterpretation] == 1} || {tags.tag[name=PhotometricInterpretation] == 2} || {tags.tag[name=PhotometricInterpretation] == 3} || {tags.tag[name=PhotometricInterpretation] == 5}">Invalid PhotometricInterpretation on TIFF/IT-FP 0th IFD field usage for various low-resolution image-data encoding</assert>
        </rule>
        <rule id="TIFF-IT-FP-IMAGE-0008" context="ifd[filetype=fp]" level="error">
            <title>Valid SamplesPerPixel on CMYK</title>
            <description>Valid SamplesPerPixel on TIFF/IT-FP 0th IFD field usage for CMYK low-resolution image-data encoding is 4</description>
            <reference>
                <section>Section 7.10.3: TIFF/IT-FP, TIFF/IT-FP and TIFF/IT-FP/P2 encoding</section><page>48</page>
            </reference>
            <assert test="{type != 'CMYK'} || {tags.tag[name=SamplesPerPixel] == 4}">Invalid SamplesPerPixel. SamplesPerPixel on TIFF/IT-FP 0th IFD field usage for CMYK low-resolution image-data encoding should be 4</assert>
        </rule>
        <rule id="TIFF-IT-FP-IMAGE-0009" context="ifd[filetype=fp]" level="error">
            <title>Forbidden SamplesPerPixel on Palette colour</title>
            <description>SamplesPerPixel is Forbidden on TIFF/IT-FP 0th IFD field usage for Palette colour low-resolution image-data encoding.</description>
            <reference>
                <section>Section 7.10.3: TIFF/IT-FP, TIFF/IT-FP and TIFF/IT-FP/P2 encoding</section><page>48</page>
            </reference>
            <assert test="{type != 'Palette'} || {!tags.tag[name=SamplesPerPixel]}" >SamplesPerPixel is forbidden on TIFF/IT-FP 0th IFD field usage for Palette colour low-resolution image-data encoding</assert>
        </rule>
        <rule id="TIFF-IT-FP-IMAGE-0010" context="ifd[filetype=fp]" level="error">
            <title>Valid SamplesPerPixel on RGB</title>
            <description>Valid SamplesPerPixel on TIFF/IT-FP 0th IFD field usage for RGB low-resolution image-data encoding is 3</description>
            <reference>
                <section>Section 7.10.3: TIFF/IT-FP, TIFF/IT-FP and TIFF/IT-FP/P2 encoding</section><page>48</page>
            </reference>
            <assert test="{type != 'RGB'} || {tags.tag[name=SamplesPerPixel] == 3}">Invalid SamplesPerPixel. SamplesPerPixel on TIFF/IT-FP 0th IFD field usage for RGB low-resolution image-data encoding should be 3 </assert>
        </rule>
        <rule id="TIFF-IT-FP-IMAGE-0011" context="ifd[filetype=fp]" level="error">
            <title>Forbidden SamplesPerPixel on Grayscale</title>
            <description>SamplesPerPixel is forbidden on TIFF/IT-FP 0th IFD field usage for Grayscale low-resolution image-data encoding</description>
            <reference>
                <section>Section 7.10.3: TIFF/IT-FP, TIFF/IT-FP and TIFF/IT-FP/P2 encoding</section><page>48</page>
            </reference>
            <assert test="{type != 'Grayscale'} || {!tags.tag[name=SamplesPerPixel]}" >SamplesPerPixel is forbidden on TIFF/IT-FP 0th IFD field usage for Grayscale low-resolution image-data encoding</assert>
        </rule>
        <rule id="TIFF-IT-FP-IMAGE-0012" context="ifd[filetype=fp]" level="error">
            <title>Forbidden SamplesPerPixel on Bilevel</title>
            <description>SamplesPerPixel is forbidden on TIFF/IT-FP 0th IFD field usage for Bilevel low-resolution image-data encoding</description>
            <reference>
                <section>Section 7.10.3: TIFF/IT-FP, TIFF/IT-FP and TIFF/IT-FP/P2 encoding</section><page>48</page>
            </reference>
            <assert test="{type != 'Bilevel'} || {!tags.tag[name=SamplesPerPixel]}" >SamplesPerPixel is forbidden on TIFF/IT-FP 0th IFD field usage for Bilevel low-resolution image-data encoding</assert>
        </rule>

        <rule id="TIFF-IT-FP-IMAGE-0013" context="ifd[filetype=fp]" level="error">
            <title>Forbidden ColorMap on CMYK</title>
            <description>ColorMap is forbidden on TIFF/IT-FP 0th IFD field usage for CMYK low-resolution image-data encoding</description>
            <reference>
                <section>Section 7.10.3: TIFF/IT-FP, TIFF/IT-FP and TIFF/IT-FP/P2 encoding</section><page>48</page>
            </reference>
            <assert test="{type != 'CMYK'} || {!tags.tag[name=ColorMap]}">ColorMap is forbidden on TIFF/IT-FP 0th IFD field usage for CMYK low-resolution image-data encoding</assert>
        </rule>
        <rule id="TIFF-IT-FP-IMAGE-0014" context="ifd[filetype=fp]" level="error">
            <title>Mandatory ColorMap on Palette colour</title>
            <description>ColorMap is Mandatory on TIFF/IT-FP 0th IFD field usage for Palette colour low-resolution image-data encoding.</description>
            <reference>
                <section>Section 7.10.3: TIFF/IT-FP, TIFF/IT-FP and TIFF/IT-FP/P2 encoding</section><page>48</page>
            </reference>
            <assert test="{type != 'Palette'} || {tags.tag[name=ColorMap]}" >ColorMap is mandatory on TIFF/IT-FP 0th IFD field usage for Palette colour low-resolution image-data encoding</assert>
        </rule>
        <rule id="TIFF-IT-FP-IMAGE-0015" context="ifd[filetype=fp]" level="error">
            <title>Forbidden ColorMap on RGB</title>
            <description>ColorMap is forbidden on TIFF/IT-FP 0th IFD field usage for RGB low-resolution image-data encoding</description>
            <reference>
                <section>Section 7.10.3: TIFF/IT-FP, TIFF/IT-FP and TIFF/IT-FP/P2 encoding</section><page>48</page>
            </reference>
            <assert test="{type != 'RGB'} || {!tags.tag[name=ColorMap]}">ColorMap is forbidden on TIFF/IT-FP 0th IFD field usage for RGB low-resolution image-data encoding</assert>
        </rule>
        <rule id="TIFF-IT-FP-IMAGE-0016" context="ifd[filetype=fp]" level="error">
            <title>Forbidden ColorMap on Grayscale</title>
            <description>ColorMap is forbidden on TIFF/IT-FP 0th IFD field usage for Grayscale low-resolution image-data encoding</description>
            <reference>
                <section>Section 7.10.3: TIFF/IT-FP, TIFF/IT-FP and TIFF/IT-FP/P2 encoding</section><page>48</page>
            </reference>
            <assert test="{type != 'Grayscale'} || {!tags.tag[name=ColorMap]}" >ColorMap is forbidden on TIFF/IT-FP 0th IFD field usage for Grayscale low-resolution image-data encoding</assert>
        </rule>
        <rule id="TIFF-IT-FP-IMAGE-0017" context="ifd[filetype=fp]" level="error">
            <title>Forbidden ColorMap on Bilevel</title>
            <description>ColorMap is forbidden on TIFF/IT-FP 0th IFD field usage for Bilevel low-resolution image-data encoding</description>
            <reference>
                <section>Section 7.10.3: TIFF/IT-FP, TIFF/IT-FP and TIFF/IT-FP/P2 encoding</section><page>48</page>
            </reference>
            <assert test="{type != 'Bilevel'} || {!tags.tag[name=ColorMap]}" >ColorMap is forbidden on TIFF/IT-FP 0th IFD field usage for Bilevel low-resolution image-data encoding</assert>
        </rule>
        <rule id="TIFF-IT-FP-IMAGE-0018" context="ifd[filetype=fp]" level="error">
            <title>valid InkSet value on CMYK</title>
            <description>InkSet valid value on TIFF/IT-FP 0th IFD field usage for CMYK low-resolution image-data encoding is 1</description>
            <reference>
                <section>Section 7.10.3: TIFF/IT-FP, TIFF/IT-FP and TIFF/IT-FP/P2 encoding</section><page>48</page>
            </reference>
            <assert test="{type != 'CMYK'} || {tags.tag[name=InkSet] == 1}">Invalid InkSet value. InkSet value on TIFF/IT-FP 0th IFD field usage for CMYK low-resolution image-data encoding should be 1</assert>
        </rule>
        <rule id="TIFF-IT-FP-IMAGE-0019" context="ifd[filetype=fp]" level="error">
            <title>Forbidden InkSet on Palette colour</title>
            <description>InkSet is forbidden on TIFF/IT-FP 0th IFD field usage for Palette colour low-resolution image-data encoding.</description>
            <reference>
                <section>Section 7.10.3: TIFF/IT-FP, TIFF/IT-FP and TIFF/IT-FP/P2 encoding</section><page>48</page>
            </reference>
            <assert test="{type != 'Palette'} || {!tags.tag[name=InkSet]}" >InkSet is forbidden on TIFF/IT-FP 0th IFD field usage for Palette colour low-resolution image-data encoding</assert>
        </rule>
        <rule id="TIFF-IT-FP-IMAGE-0020" context="ifd[filetype=fp]" level="error">
            <title>Forbidden InkSet on RGB</title>
            <description>InkSet is forbidden on TIFF/IT-FP 0th IFD field usage for RGB low-resolution image-data encoding</description>
            <reference>
                <section>Section 7.10.3: TIFF/IT-FP, TIFF/IT-FP and TIFF/IT-FP/P2 encoding</section><page>48</page>
            </reference>
            <assert test="{type != 'RGB'} || {!tags.tag[name=InkSet]}">InkSet is forbidden on TIFF/IT-FP 0th IFD field usage for RGB low-resolution image-data encoding</assert>
        </rule>
        <rule id="TIFF-IT-FP-IMAGE-0021" context="ifd[filetype=fp]" level="error">
            <title>Forbidden InkSet on Grayscale</title>
            <description>InkSet is forbidden on TIFF/IT-FP 0th IFD field usage for Grayscale low-resolution image-data encoding</description>
            <reference>
                <section>Section 7.10.3: TIFF/IT-FP, TIFF/IT-FP and TIFF/IT-FP/P2 encoding</section><page>48</page>
            </reference>
            <assert test="{type != 'Grayscale'} || {!tags.tag[name=InkSet]}" >InkSet is forbidden on TIFF/IT-FP 0th IFD field usage for Grayscale low-resolution image-data encoding</assert>
        </rule>
        <rule id="TIFF-IT-FP-IMAGE-0022" context="ifd[filetype=fp]" level="error">
            <title>Forbidden InkSet on Bilevel</title>
            <description>InkSet is forbidden on TIFF/IT-FP 0th IFD field usage for Bilevel low-resolution image-data encoding</description>
            <reference>
                <section>Section 7.10.3: TIFF/IT-FP, TIFF/IT-FP and TIFF/IT-FP/P2 encoding</section><page>48</page>
            </reference>
            <assert test="{type != 'Bilevel'} || {!tags.tag[name=InkSet]}" >InkSet is forbidden on TIFF/IT-FP 0th IFD field usage for Bilevel low-resolution image-data encoding</assert>
        </rule>
        <rule id="TIFF-IT-FP-IMAGE-0023" context="ifd[filetype=fp]" level="error">
            <title>valid NumberOfInks value on CMYK</title>
            <description>NumberOfInks valid value on TIFF/IT-FP 0th IFD field usage for CMYK low-resolution image-data encoding is 4</description>
            <reference>
                <section>Section 7.10.3: TIFF/IT-FP, TIFF/IT-FP and TIFF/IT-FP/P2 encoding</section><page>48</page>
            </reference>
            <assert test="{type != 'CMYK'} || {tags.tag[name=NumberOfInks] == 4}">Invalid NumberOfInks value. NumberOfInks value on TIFF/IT-FP 0th IFD field usage for CMYK low-resolution image-data encoding should be 4</assert>
        </rule>
        <rule id="TIFF-IT-FP-IMAGE-0024" context="ifd[filetype=fp]" level="error">
            <title>Forbidden NumberOfInks on Palette colour</title>
            <description>NumberOfInks is forbidden on TIFF/IT-FP 0th IFD field usage for Palette colour low-resolution image-data encoding.</description>
            <reference>
                <section>Section 7.10.3: TIFF/IT-FP, TIFF/IT-FP and TIFF/IT-FP/P2 encoding</section><page>48</page>
            </reference>
            <assert test="{type != 'Palette'} || {!tags.tag[name=NumberOfInks]}" >NumberOfInks is forbidden on TIFF/IT-FP 0th IFD field usage for Palette colour low-resolution image-data encoding</assert>
        </rule>
        <rule id="TIFF-IT-FP-IMAGE-0025" context="ifd[filetype=fp]" level="error">
            <title>Forbidden NumberOfInks on RGB</title>
            <description>NumberOfInks is forbidden on TIFF/IT-FP 0th IFD field usage for RGB low-resolution image-data encoding is 3</description>
            <reference>
                <section>Section 7.10.3: TIFF/IT-FP, TIFF/IT-FP and TIFF/IT-FP/P2 encoding</section><page>48</page>
            </reference>
            <assert test="{type != 'RGB'} || {!tags.tag[name=NumberOfInks]}">NumberOfInks is forbidden on TIFF/IT-FP 0th IFD field usage for RGB low-resolution image-data encoding</assert>
        </rule>
        <rule id="TIFF-IT-FP-IMAGE-0026" context="ifd[filetype=fp]" level="error">
            <title>Forbidden NumberOfInks on Grayscale</title>
            <description>NumberOfInks is forbidden on TIFF/IT-FP 0th IFD field usage for Grayscale low-resolution image-data encoding is 4 or 8</description>
            <reference>
                <section>Section 7.10.3: TIFF/IT-FP, TIFF/IT-FP and TIFF/IT-FP/P2 encoding</section><page>48</page>
            </reference>
            <assert test="{type != 'Grayscale'} || {!tags.tag[name=NumberOfInks]}" >NumberOfInks is forbidden on TIFF/IT-FP 0th IFD field usage for Grayscale low-resolution image-data encoding should be 4 or 8 </assert>
        </rule>
        <rule id="TIFF-IT-FP-IMAGE-0027" context="ifd[filetype=fp]" level="error">
            <title>Forbidden NumberOfInks on Bilevel</title>
            <description>NumberOfInks is forbidden on TIFF/IT-FP 0th IFD field usage for Bilevel low-resolution image-data encoding</description>
            <reference>
                <section>Section 7.10.3: TIFF/IT-FP, TIFF/IT-FP and TIFF/IT-FP/P2 encoding</section><page>48</page>
            </reference>
            <assert test="{type != 'Bilevel'} || {!tags.tag[name=NumberOfInks]}" >NumberOfInks is forbidden on TIFF/IT-FP 0th IFD field usage for Bilevel low-resolution image-data encoding</assert>
        </rule>
        <rule id="TIFF-IT-FP-IMAGE-0028" context="ifd[filetype=fp]" level="error">
            <title>valid DotRange value on CMYK</title>
            <description>DotRange valid value on TIFF/IT-FP 0th IFD field usage for CMYK low-resolution image-data encoding is 0,255</description>
            <reference>
                <section>Section 7.10.3: TIFF/IT-FP, TIFF/IT-FP and TIFF/IT-FP/P2 encoding</section><page>48</page>
            </reference>
            <assert test="{type != 'CMYK'} || {tags.tag[name=DotRange] == 0,255}">Invalid DotRange value. DotRange value on TIFF/IT-FP 0th IFD field usage for CMYK low-resolution image-data encoding should be 0,255</assert>
        </rule>
        <rule id="TIFF-IT-FP-IMAGE-0029" context="ifd[filetype=fp]" level="error">
            <title>Forbidden DotRange on Palette colour</title>
            <description>DotRange is forbidden on TIFF/IT-FP 0th IFD field usage for Palette colour low-resolution image-data encoding.</description>
            <reference>
                <section>Section 7.10.3: TIFF/IT-FP, TIFF/IT-FP and TIFF/IT-FP/P2 encoding</section><page>48</page>
            </reference>
            <assert test="{type != 'Palette'} || {!tags.tag[name=DotRange]}" >DotRange is forbidden on TIFF/IT-FP 0th IFD field usage for Palette colour low-resolution image-data encoding</assert>
        </rule>
        <rule id="TIFF-IT-FP-IMAGE-0030" context="ifd[filetype=fp]" level="error">
            <title>Forbidden DotRange on RGB</title>
            <description>DotRange is forbidden on TIFF/IT-FP 0th IFD field usage for RGB low-resolution image-data encoding is 3</description>
            <reference>
                <section>Section 7.10.3: TIFF/IT-FP, TIFF/IT-FP and TIFF/IT-FP/P2 encoding</section><page>48</page>
            </reference>
            <assert test="{type != 'RGB'} || {!tags.tag[name=DotRange]}">DotRange is forbidden on TIFF/IT-FP 0th IFD field usage for RGB low-resolution image-data encoding</assert>
        </rule>
        <rule id="TIFF-IT-FP-IMAGE-0031" context="ifd[filetype=fp]" level="error">
            <title>Forbidden DotRange on Grayscale</title>
            <description>DotRange is forbidden on TIFF/IT-FP 0th IFD field usage for Grayscale low-resolution image-data encoding is 4 or 8</description>
            <reference>
                <section>Section 7.10.3: TIFF/IT-FP, TIFF/IT-FP and TIFF/IT-FP/P2 encoding</section><page>48</page>
            </reference>
            <assert test="{type != 'Grayscale'} || {!tags.tag[name=DotRange]}" >DotRange is forbidden on TIFF/IT-FP 0th IFD field usage for Grayscale low-resolution image-data encoding should be 4 or 8 </assert>
        </rule>
        <rule id="TIFF-IT-FP-IMAGE-0032" context="ifd[filetype=fp]" level="error">
            <title>Forbidden DotRange on Bilevel</title>
            <description>DotRange is forbidden on TIFF/IT-FP 0th IFD field usage for Bilevel low-resolution image-data encoding</description>
            <reference>
                <section>Section 7.10.3: TIFF/IT-FP, TIFF/IT-FP and TIFF/IT-FP/P2 encoding</section><page>48</page>
            </reference>
            <assert test="{type != 'Bilevel'} || {!tags.tag[name=DotRange]}" >DotRange is forbidden on TIFF/IT-FP 0th IFD field usage for Bilevel low-resolution image-data encoding</assert>
        </rule>
    </rules>
</implementationCheckerObject>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy