/** * Removes a tag definition for given defined tag constant. * * @param tagId a defined tag constant, e.g. {@link #TAG_IMAGE_WIDTH}. */ @SuppressWarnings( "unused" ) public void removeTagDefinition( int tagId ) { getTagInfo().delete( tagId ); }
/** * Removes a tag definition for given defined tag constant. * * @param tagId a defined tag constant, e.g. {@link #TAG_IMAGE_WIDTH}. */ @SuppressWarnings( "unused" ) public void removeTagDefinition( int tagId ) { getTagInfo().delete( tagId ); }
public boolean checkAllowed( int ifd, int tagId ) { int info = mInterface.getTagInfo().get( tagId ); if( info == ExifInterface.DEFINITION_NULL ) { return false; } return ExifInterface.isIfdAllowed( info, ifd ); }
@SuppressWarnings( "unused" ) protected int getTagDefinition( short tagId, int defaultIfd ) { return getTagInfo().get( defineTag( defaultIfd, tagId ) ); }
/** * Checks whether a tag has a defined number of elements. * * @param tagId a defined tag constant, e.g. {@link #TAG_IMAGE_WIDTH}. * @return true if the tag has a defined number of elements. */ @SuppressWarnings( "unused" ) public boolean isTagCountDefined( int tagId ) { int info = getTagInfo().get( tagId ); // No value in info can be zero, as all tags have a non-zero type return info != 0 && getComponentCountFromInfo( info ) != ExifTag.SIZE_UNDEFINED; }
public boolean checkAllowed( int ifd, int tagId ) { int info = mInterface.getTagInfo().get( tagId ); if( info == ExifInterface.DEFINITION_NULL ) { return false; } return ExifInterface.isIfdAllowed( info, ifd ); }
/** * Checks whether a tag has a defined number of elements. * * @param tagId a defined tag constant, e.g. {@link #TAG_IMAGE_WIDTH}. * @return true if the tag has a defined number of elements. */ @SuppressWarnings( "unused" ) public boolean isTagCountDefined( int tagId ) { int info = getTagInfo().get( tagId ); // No value in info can be zero, as all tags have a non-zero type return info != 0 && getComponentCountFromInfo( info ) != ExifTag.SIZE_UNDEFINED; }
/** * Gets the default IFD for a tag. * * @param tagId a defined tag constant, e.g. {@link #TAG_IMAGE_WIDTH}. * @return the default IFD for a tag definition or {@link #IFD_NULL} if no * definition exists. */ public int getDefinedTagDefaultIfd( int tagId ) { int info = getTagInfo().get( tagId ); if( info == DEFINITION_NULL ) { return IFD_NULL; } return getTrueIfd( tagId ); }
@SuppressWarnings( "unused" ) protected int getTagDefinition( short tagId, int defaultIfd ) { return getTagInfo().get( defineTag( defaultIfd, tagId ) ); }
/** * Gets the defined number of elements for a tag. * * @param tagId a defined tag constant, e.g. {@link #TAG_IMAGE_WIDTH}. * @return the number of elements or {@link ExifTag#SIZE_UNDEFINED} if the * tag or the number of elements is not defined. */ @SuppressWarnings( "unused" ) public int getDefinedTagCount( int tagId ) { int info = getTagInfo().get( tagId ); if( info == 0 ) { return ExifTag.SIZE_UNDEFINED; } return getComponentCountFromInfo( info ); }
/** * Gets the defined number of elements for a tag. * * @param tagId a defined tag constant, e.g. {@link #TAG_IMAGE_WIDTH}. * @return the number of elements or {@link ExifTag#SIZE_UNDEFINED} if the * tag or the number of elements is not defined. */ @SuppressWarnings( "unused" ) public int getDefinedTagCount( int tagId ) { int info = getTagInfo().get( tagId ); if( info == 0 ) { return ExifTag.SIZE_UNDEFINED; } return getComponentCountFromInfo( info ); }
/** * Gets the default IFD for a tag. * * @param tagId a defined tag constant, e.g. {@link #TAG_IMAGE_WIDTH}. * @return the default IFD for a tag definition or {@link #IFD_NULL} if no * definition exists. */ public int getDefinedTagDefaultIfd( int tagId ) { int info = getTagInfo().get( tagId ); if( info == DEFINITION_NULL ) { return IFD_NULL; } return getTrueIfd( tagId ); }
public boolean isDefinedTag(int ifdId, int tagId ) { return mInterface.getTagInfo().get(ExifInterface.defineTag(ifdId, (short)tagId)) != ExifInterface.DEFINITION_NULL; }
public boolean isDefinedTag(int ifdId, int tagId ) { return mInterface.getTagInfo().get(ExifInterface.defineTag(ifdId, (short)tagId)) != ExifInterface.DEFINITION_NULL; }
/** * Gets the defined type for a tag. * * @param tagId a defined tag constant, e.g. {@link #TAG_IMAGE_WIDTH}. * @return the type. * @see ExifTag#getDataType() */ @SuppressWarnings( "unused" ) public short getDefinedTagType( int tagId ) { int info = getTagInfo().get( tagId ); if( info == 0 ) { return - 1; } return getTypeFromInfo( info ); }
/** * Gets the defined type for a tag. * * @param tagId a defined tag constant, e.g. {@link #TAG_IMAGE_WIDTH}. * @return the type. * @see ExifTag#getDataType() */ @SuppressWarnings( "unused" ) public short getDefinedTagType( int tagId ) { int info = getTagInfo().get( tagId ); if( info == 0 ) { return - 1; } return getTypeFromInfo( info ); }
protected int[] getTagDefinitionsForTagId( short tagId ) { int[] ifds = IfdData.getIfds(); int[] defs = new int[ifds.length]; int counter = 0; SparseIntArray infos = getTagInfo(); for( int i : ifds ) { int def = defineTag( i, tagId ); if( infos.get( def ) != DEFINITION_NULL ) { defs[counter++] = def; } } if( counter == 0 ) { return null; } return Arrays.copyOfRange( defs, 0, counter ); }
protected int[] getTagDefinitionsForTagId( short tagId ) { int[] ifds = IfdData.getIfds(); int[] defs = new int[ifds.length]; int counter = 0; SparseIntArray infos = getTagInfo(); for( int i : ifds ) { int def = defineTag( i, tagId ); if( infos.get( def ) != DEFINITION_NULL ) { defs[counter++] = def; } } if( counter == 0 ) { return null; } return Arrays.copyOfRange( defs, 0, counter ); }
protected ExifTag buildUninitializedTag( int tagId ) { int info = getTagInfo().get( tagId ); if( info == 0 ) { return null; } short type = getTypeFromInfo( info ); int definedCount = getComponentCountFromInfo( info ); boolean hasDefinedCount = ( definedCount != ExifTag.SIZE_UNDEFINED ); int ifdId = getTrueIfd( tagId ); return new ExifTag( getTrueTagKey( tagId ), type, definedCount, ifdId, hasDefinedCount ); }
protected ExifTag buildUninitializedTag( int tagId ) { int info = getTagInfo().get( tagId ); if( info == 0 ) { return null; } short type = getTypeFromInfo( info ); int definedCount = getComponentCountFromInfo( info ); boolean hasDefinedCount = ( definedCount != ExifTag.SIZE_UNDEFINED ); int ifdId = getTrueIfd( tagId ); return new ExifTag( getTrueTagKey( tagId ), type, definedCount, ifdId, hasDefinedCount ); }