List of usage examples for org.apache.commons.imaging.formats.tiff TiffField getDoubleValue
public double getDoubleValue() throws ImageReadException
From source file:net.mozq.picto.core.ProcessCore.java
private static Double getEXIFDoubleValue(ImageMetadata imageMetadata, TagInfo tagInfo) { TiffField field = getTiffField(imageMetadata, tagInfo); if (field == null) { return null; }/*from www . j a v a 2 s. co m*/ Double value; try { value = Double.valueOf(field.getDoubleValue()); } catch (ImageReadException e) { value = null; } return value; }
From source file:net.tourbook.photo.Photo.java
/** * Image direction/*from www . j a va2 s.c o m*/ * * @param tagInfo */ private double getExifValueDouble(final JpegImageMetadata jpegMetadata, final TagInfo tagInfo) { try { final TiffField field = jpegMetadata.findEXIFValueWithExactMatch(tagInfo); if (field != null) { return field.getDoubleValue(); } } catch (final Exception e) { // ignore } return Double.MIN_VALUE; }