/** * Gets the value as an int. If there are more than 1 ints in this value, * gets the first one. This method should be used for tags of type * {@link #TYPE_UNSIGNED_SHORT}, {@link #TYPE_UNSIGNED_LONG}. * * @param defaultValue the int to return if tag's value does not exist or * cannot be converted to an int. * @return the tag's value as a int, or the defaultValue. */ public int getValueAsInt( int defaultValue ) { int[] i = getValueAsInts(); if( i == null || i.length < 1 ) { return defaultValue; } return i[0]; }
/** * Gets the value as an int. If there are more than 1 ints in this value, * gets the first one. This method should be used for tags of type * {@link #TYPE_UNSIGNED_SHORT}, {@link #TYPE_UNSIGNED_LONG}. * * @param defaultValue the int to return if tag's value does not exist or * cannot be converted to an int. * @return the tag's value as a int, or the defaultValue. */ public int getValueAsInt( int defaultValue ) { int[] i = getValueAsInts(); if( i == null || i.length < 1 ) { return defaultValue; } return i[0]; }
/** * @see #getTagValue */ public int[] getTagIntValues( int tagId, int ifdId ) { ExifTag t = getTag( tagId, ifdId ); if( t == null ) { return null; } return t.getValueAsInts(); }
/** * @see #getTagValue */ public int[] getTagIntValues( int tagId, int ifdId ) { ExifTag t = getTag( tagId, ifdId ); if( t == null ) { return null; } return t.getValueAsInts(); }