public boolean setBitsPerSample ( int bitsPerSample ) { boolean result = ( ( bitsPerSample <= MAX_BITS_PER_SAMPLE ) && ( bitsPerSample >= MIN_BITS_PER_SAMPLE ) ) ; this . bitsPerSample = bitsPerSample ; return result ; }
Set the bits per sample . Because this is not a value that may be guessed and corrected the value will be set to that given even if it is not valid .