private void validateIfdHC ( IFD ifd , int p ) { IfdTags metadata = ifd . getMetadata ( ) ; int spp = - 1 ; if ( metadata . containsTagId ( TiffTags . getTagId ( "SampesPerPixel" ) ) ) { spp = ( int ) metadata . get ( TiffTags . getTagId ( "SampesPerPixel" ) ) . getFirstNumericValue ( ) ; } if ( p == 1 ) { checkRequiredTag ( metadata , "NewSubfileType" , 1 , new long [ ] { 0 } ) ; } checkRequiredTag ( metadata , "ImageLength" , 1 ) ; checkRequiredTag ( metadata , "ImageWidth" , 1 ) ; checkRequiredTag ( metadata , "BitsPerSample" , spp ) ; if ( p == 1 ) { checkRequiredTag ( metadata , "BitsPerSample" , 4 , new long [ ] { 8 } ) ; } checkRequiredTag ( metadata , "Compression" , 1 , new long [ ] { 32897 } ) ; checkRequiredTag ( metadata , "PhotometricInterpretation" , 1 , new long [ ] { 5 } ) ; checkRequiredTag ( metadata , "StripOffsets" , 1 ) ; if ( p == 1 || p == 2 ) { checkRequiredTag ( metadata , "Orientation" , 1 , new long [ ] { 1 } ) ; } if ( p == 1 ) { checkRequiredTag ( metadata , "SamplesPerPixel" , 1 , new long [ ] { 4 } ) ; } checkRequiredTag ( metadata , "StripBYTECount" , 1 ) ; checkRequiredTag ( metadata , "XResolution" , 1 ) ; checkRequiredTag ( metadata , "YResolution" , 1 ) ; checkRequiredTag ( metadata , "PlanarConfiguration" , 1 , new long [ ] { 1 } ) ; if ( p == 1 || p == 2 ) { checkRequiredTag ( metadata , "ResolutionUnit" , 1 , new long [ ] { 2 , 3 } ) ; checkRequiredTag ( metadata , "InkSet" , 1 , new long [ ] { 1 } ) ; checkRequiredTag ( metadata , "NumberOfInks" , 1 , new long [ ] { 4 } ) ; checkRequiredTag ( metadata , "DotRange" , 2 , new long [ ] { 0 , 255 } ) ; } checkRequiredTag ( metadata , "TransparencyIndicator" , 1 , new long [ ] { 0 , 1 } ) ; }
Validate High - Resolution Continuous - Tone .