Example usage for org.apache.commons.imaging.formats.tiff TiffField getIntArrayValue

List of usage examples for org.apache.commons.imaging.formats.tiff TiffField getIntArrayValue

Introduction

In this page you can find the example usage for org.apache.commons.imaging.formats.tiff TiffField getIntArrayValue.

Prototype

public int[] getIntArrayValue() throws ImageReadException 

Source Link

Usage

From source file:joachimeichborn.geotag.io.jpeg.PictureMetadataReader.java

private int[] getTagIntValue(final TagInfo aTagInfo) {
    if (jpegMetadata != null) {
        final TiffField field = jpegMetadata.findEXIFValueWithExactMatch(aTagInfo);
        if (field != null) {
            final FieldType fieldType = field.getFieldType();
            if (fieldType.getType() == FieldType.SHORT.getType()) {
                try {
                    return field.getIntArrayValue();
                } catch (ImageReadException e) {
                    logger.fine("Failed to read " + aTagInfo + " from " + pictureFile + ": " + e.getMessage());
                }//from  w w w.j  a va  2  s  . c o  m
            }
        }
    }
    return null;
}