private void CheckTransparencyMask ( IfdTags metadata , int n ) { // Samples per pixel if ( ! metadata . containsTagId ( TiffTags . getTagId ( "SamplesPerPixel" ) ) ) { validation . addErrorLoc ( "Missing Samples Per Pixel" , "IFD" + n ) ; } else { long spp = metadata . get ( TiffTags . getTagId ( "SamplesPerPixel" ) ) . getFirstNumericValue ( ) ; if ( spp != 1 ) { validation . addError ( "Invalid Samples Per Pixel" , "IFD" + n , spp ) ; } } // BitsPerSample if ( ! metadata . containsTagId ( TiffTags . getTagId ( "BitsPerSample" ) ) ) { validation . addErrorLoc ( "Missing BitsPerSample" , "IFD" + n ) ; } else { long bps = metadata . get ( TiffTags . getTagId ( "BitsPerSample" ) ) . getFirstNumericValue ( ) ; if ( bps != 1 ) { validation . addError ( "Invalid BitsPerSample" , "IFD" + n , bps ) ; } } }
Check transparency mask .