protected boolean isHomogenous(final int size) {
        for (final int element : bitsPerSample) {
            if (element != size) {
                return false;
            }
        }
        return true;
    }
Checks if all the bits per sample entries are the same size

@param size the size to check
@return true if all the bits per sample entries are the same
src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/AbstractImageDataReader.java