audittool/test-lib/src/main/java/io/bdrc/audit/audittests/ImageEXIFAttributes.java
public void DumpCommonsMetadata(final File fileObject)  {

        Logger logger = LoggerFactory.getLogger(this.getClass());

        // just in case caller forgets
        if (logger.isDebugEnabled()) {
            try {
                // Pass1: apache commons
                BufferedInputStream bStream = new BufferedInputStream(FileUtils.openInputStream(fileObject), 4096);
                bStream.mark(1289987);
                logger.debug("----------- apache commons imaging   {} ImageMetadata BEGIN  -------------",
                        fileObject.getAbsolutePath());
                ImageMetadata imageMetadata = Imaging.getMetadata(bStream, null);
                for (ImageMetadata.ImageMetadataItem imi : imageMetadata.getItems()) {
                    logger.debug(String.valueOf(imi));
                }
                logger.debug("-----------  apache commons imaging    ImageMetadata END  -------------");
                bStream.reset();
                logger.debug("-----------  apache commons imaging  {}  ICC Profile BEGIN  -------------", fileObject.getAbsolutePath());
                ICC_Profile iccProfile = Imaging.getICCProfile(bStream, null);
                logger.debug("Class {} /  numComponents: {} / colorspace type: {}", iccProfile.getProfileClass(),
                        iccProfile.getNumComponents(),
                        iccProfile.getColorSpaceType());
                logger.debug("-----------  apache commons imaging   ICC Profile END  -------------");

            } catch (IOException | ImageReadException ioe) {
                logger.error("{} file {}", ioe, fileObject);
            }
        }
    }
/**
     * Use different libraries to get metadata
     * @param fileObject analyze this
     */
Use different libraries to get metadata
@param fileObject analyze this
Use different libraries to get metadata @param fileObject analyze this
public void DumpCommonsMetadata(final File fileObject)  {
        Logger logger = LoggerFactory.getLogger(this.getClass());
        if (logger.isDebugEnabled()) {
            try {
                BufferedInputStream bStream = new BufferedInputStream(FileUtils.openInputStream(fileObject), 4096);
                bStream.mark(1289987);
                logger.debug("----------- apache commons imaging   {} ImageMetadata BEGIN  -------------",
                        fileObject.getAbsolutePath());
                ImageMetadata imageMetadata = Imaging.getMetadata(bStream, null);
                for (ImageMetadata.ImageMetadataItem imi : imageMetadata.getItems()) {
                    logger.debug(String.valueOf(imi));
                }
                logger.debug("-----------  apache commons imaging    ImageMetadata END  -------------");
                bStream.reset();
                logger.debug("-----------  apache commons imaging  {}  ICC Profile BEGIN  -------------", fileObject.getAbsolutePath());
                ICC_Profile iccProfile = Imaging.getICCProfile(bStream, null);
                logger.debug("Class {} /  numComponents: {} / colorspace type: {}", iccProfile.getProfileClass(),
                        iccProfile.getNumComponents(),
                        iccProfile.getColorSpaceType());
                logger.debug("-----------  apache commons imaging   ICC Profile END  -------------");
            } catch (IOException | ImageReadException ioe) {
                logger.error("{} file {}", ioe, fileObject);
            }
        }
    }
public void DumpCommonsMetadata ( final File fileObject ) { Logger logger = LoggerFactory . getLogger ( this . getClass ( ) ) ; if ( logger . isDebugEnabled ( ) ) { try { BufferedInputStream bStream = new BufferedInputStream ( FileUtils . openInputStream ( fileObject ) , 4096 ) ; bStream . mark ( 1289987 ) ; logger . debug ( "----------- apache commons imaging   {} ImageMetadata BEGIN  -------------" , fileObject . getAbsolutePath ( ) ) ; ImageMetadata imageMetadata = Imaging . getMetadata ( bStream , null ) ; for ( ImageMetadata . ImageMetadataItem imi : imageMetadata . getItems ( ) ) { logger . debug ( String . valueOf ( imi ) ) ; } logger . debug ( "-----------  apache commons imaging    ImageMetadata END  -------------" ) ; bStream . reset ( ) ; logger . debug ( "-----------  apache commons imaging  {}  ICC Profile BEGIN  -------------" , fileObject . getAbsolutePath ( ) ) ; ICC_Profile iccProfile = Imaging . getICCProfile ( bStream , null ) ; logger . debug ( "Class {} /  numComponents: {} / colorspace type: {}" , iccProfile . getProfileClass ( ) , iccProfile . getNumComponents ( ) , iccProfile . getColorSpaceType ( ) ) ; logger . debug ( "-----------  apache commons imaging   ICC Profile END  -------------" ) ; } catch ( IOException | ImageReadException ioe ) { logger . error ( "{} file {}" , ioe , fileObject ) ; } } }
Use different libraries to get metadata
 @param fileObject analyze this
Use different libraries to get metadata @param fileObject analyze this
// just in case caller forgets // Pass1: apache commons