private void validateIfdSD ( IFD ifd , int p ) { IfdTags metadata = ifd . getMetadata ( ) ; if ( p == 2 ) { checkRequiredTag ( metadata , "NewSubfileType" , 1 , new long [ ] { 0 } ) ; } checkRequiredTag ( metadata , "ImageLength" , 1 ) ; checkRequiredTag ( metadata , "ImageWidth" , 1 ) ; checkRequiredTag ( metadata , "BitsPerSample" , 1 , new long [ ] { 1 } ) ; checkRequiredTag ( metadata , "Compression" , 1 , new long [ ] { 1 , 4 , 8 } ) ; checkRequiredTag ( metadata , "PhotometricInterpretation" , 1 , new long [ ] { 5 } ) ; checkRequiredTag ( metadata , "StripOffsets" , 1 ) ; if ( p == 0 ) { checkRequiredTag ( metadata , "Orientation" , 1 , new long [ ] { 1 , 4 , 5 , 8 } ) ; } else { checkRequiredTag ( metadata , "Orientation" , 1 , new long [ ] { 1 } ) ; } if ( p == 2 ) { checkRequiredTag ( metadata , "SamplesPerPixel" , 1 , new long [ ] { 1 , 4 } ) ; } checkRequiredTag ( metadata , "StripBYTECount" , 1 ) ; checkRequiredTag ( metadata , "XResolution" , 1 ) ; checkRequiredTag ( metadata , "YResolution" , 1 ) ; checkRequiredTag ( metadata , "PlanarConfiguration" , 1 , new long [ ] { 2 } ) ; if ( p == 2 ) { checkRequiredTag ( metadata , "ResolutionUnit" , 1 , new long [ ] { 2 , 3 } ) ; checkRequiredTag ( metadata , "NumberOfInks" , 1 , new long [ ] { 4 } ) ; } checkRequiredTag ( metadata , "InkSet" , 1 , new long [ ] { 1 } ) ; checkRequiredTag ( metadata , "BackgroundColorIndicator" , 1 , new long [ ] { 0 , 1 , 2 } ) ; }
Validate Screened Data image .