private boolean keepChunk(final int chunkType, final ChunkType[] chunkTypes) {
        // System.out.println("keepChunk: ");
        if (chunkTypes == null) {
            return true;
        }

        for (final ChunkType chunkType2 : chunkTypes) {
            if (chunkType2.value == chunkType) {
                return true;
            }
        }
        return false;
    }
Gets TIFF image metadata for a byte source.

@param byteSource The source of the image.
@return TIFF image metadata.
@throws ImagingException In the event that the specified content does not conform to the format of the specific parser implementation.
@throws IOException      In the event of unsuccessful data read operation.
@since 1.0-alpha6
src/main/java/org/apache/commons/imaging/formats/png/PngImageParser.java