/** * @see #getTagValue */ public byte[] getTagByteValues( int tagId, int ifdId ) { ExifTag t = getTag( tagId, ifdId ); if( t == null ) { return null; } return t.getValueAsBytes(); }
ExifTag tag = mExif.getTag( ExifInterface.TAG_EXIF_VERSION ); if( null != tag ) { string.append( "<b>Exif version: </b> " + tag.getValueAsString() + "<br>" ); ExifTag shutterSpeed = mExif.getTag( ExifInterface.TAG_SHUTTER_SPEED_VALUE ); if( null != shutterSpeed ) { double speed = shutterSpeed.getValueAsRational( 0 ).toDouble();
/** * @see #getTagValue */ public long[] getTagLongValues( int tagId, int ifdId ) { ExifTag t = getTag( tagId, ifdId ); if( t == null ) { return null; } return t.getValueAsLongs(); }
/** * Gets a tag value for an IFD other than the tag's default. * * @see #getTagValue */ public Object getTagValue( int tagId, int ifdId ) { ExifTag t = getTag( tagId, ifdId ); return ( t == null ) ? null : t.getValue(); }
/** * @see #getTagValue */ public Rational[] getTagRationalValues( int tagId, int ifdId ) { ExifTag t = getTag( tagId, ifdId ); if( t == null ) { return null; } return t.getValueAsRationals(); }
/** * @see #getTagValue */ public String getTagStringValue( int tagId, int ifdId ) { ExifTag t = getTag( tagId, ifdId ); if( t == null ) { return null; } return t.getValueAsString(); }
/** * @see #getTagValue */ public long[] getTagLongValues( int tagId, int ifdId ) { ExifTag t = getTag( tagId, ifdId ); if( t == null ) { return null; } return t.getValueAsLongs(); }
/** * Returns the ExifTag in that tag's default IFD for a defined tag constant * or null if none exists. * * @param tagId a defined tag constant, e.g. {@link #TAG_IMAGE_WIDTH}. * @return an {@link ExifTag} or null if none exists. */ public ExifTag getTag( int tagId ) { int ifdId = getDefinedTagDefaultIfd( tagId ); return getTag( tagId, ifdId ); }
/** * @see #getTagValue */ public int[] getTagIntValues( int tagId, int ifdId ) { ExifTag t = getTag( tagId, ifdId ); if( t == null ) { return null; } return t.getValueAsInts(); }
/** * Returns the ExifTag in that tag's default IFD for a defined tag constant * or null if none exists. * * @param tagId a defined tag constant, e.g. {@link #TAG_IMAGE_WIDTH}. * @return an {@link ExifTag} or null if none exists. */ public ExifTag getTag( int tagId ) { int ifdId = getDefinedTagDefaultIfd( tagId ); return getTag( tagId, ifdId ); }
/** * @see #getTagValue */ public int[] getTagIntValues( int tagId, int ifdId ) { ExifTag t = getTag( tagId, ifdId ); if( t == null ) { return null; } return t.getValueAsInts(); }
/** * Gets a tag value for an IFD other than the tag's default. * * @see #getTagValue */ public Object getTagValue( int tagId, int ifdId ) { ExifTag t = getTag( tagId, ifdId ); return ( t == null ) ? null : t.getValue(); }
/** * @see #getTagValue */ public String getTagStringValue( int tagId, int ifdId ) { ExifTag t = getTag( tagId, ifdId ); if( t == null ) { return null; } return t.getValueAsString(); }
/** * @see #getTagValue */ public byte[] getTagByteValues( int tagId, int ifdId ) { ExifTag t = getTag( tagId, ifdId ); if( t == null ) { return null; } return t.getValueAsBytes(); }
/** * @see #getTagValue */ public Rational[] getTagRationalValues( int tagId, int ifdId ) { ExifTag t = getTag( tagId, ifdId ); if( t == null ) { return null; } return t.getValueAsRationals(); }
/** * Sets the value of an ExifTag if it exists in the given IFD. The value * must be the correct type and length for that ExifTag. * * @param tagId a tag constant, e.g. {@link #TAG_IMAGE_WIDTH}. * @param ifdId the IFD that the ExifTag is in. * @param val the value to set. * @return true if success, false if the ExifTag doesn't exist or the value * is the wrong type/length. * @see #setTagValue */ public boolean setTagValue( int tagId, int ifdId, Object val ) { ExifTag t = getTag( tagId, ifdId ); return t != null && t.setValue( val ); }
/** * Sets the value of an ExifTag if it exists in the given IFD. The value * must be the correct type and length for that ExifTag. * * @param tagId a tag constant, e.g. {@link #TAG_IMAGE_WIDTH}. * @param ifdId the IFD that the ExifTag is in. * @param val the value to set. * @return true if success, false if the ExifTag doesn't exist or the value * is the wrong type/length. * @see #setTagValue */ public boolean setTagValue( int tagId, int ifdId, Object val ) { ExifTag t = getTag( tagId, ifdId ); return t != null && t.setValue( val ); }
/** * Gets the number of elements for an ExifTag in a given IFD. * * @param tagId a defined tag constant, e.g. {@link #TAG_IMAGE_WIDTH}. * @param ifdId the IFD containing the ExifTag to check. * @return the number of elements in the ExifTag, if the tag's size is * undefined this will return the actual number of elements that is * in the ExifTag's value. */ @SuppressWarnings( "unused" ) public int getActualTagCount( int tagId, int ifdId ) { ExifTag t = getTag( tagId, ifdId ); if( t == null ) { return 0; } return t.getComponentCount(); }
/** * Gets the number of elements for an ExifTag in a given IFD. * * @param tagId a defined tag constant, e.g. {@link #TAG_IMAGE_WIDTH}. * @param ifdId the IFD containing the ExifTag to check. * @return the number of elements in the ExifTag, if the tag's size is * undefined this will return the actual number of elements that is * in the ExifTag's value. */ @SuppressWarnings( "unused" ) public int getActualTagCount( int tagId, int ifdId ) { ExifTag t = getTag( tagId, ifdId ); if( t == null ) { return 0; } return t.getComponentCount(); }
private String createStringFromIfFound( ExifInterface exif, int key, String label, final List<ExifTag> all_tags ) { String exifString = ""; ExifTag tag = exif.getTag( key ); if( null != tag ) {