private static FormatCompliance getFormatCompliance(final ByteSource byteSource) throws ImagingException, IOException {
        final AbstractImageParser<?> imageParser = ImageParserFactory.getImageParser(byteSource);
        return imageParser.getFormatCompliance(byteSource);
    }
Attempts to determine the image format of the specified data and evaluates its format compliance.

<p>
This method returns a FormatCompliance object which includes information about the data's compliance to a specific format.
</p>

@param bytes a valid array of bytes containing image data.
@return if successful, a valid FormatCompliance object.
@throws ImagingException in the event of unreadable data.
@throws IOException      in the event of an unrecoverable I/O condition.
src/main/java/org/apache/commons/imaging/Imaging.java