/** * Creates a tag for a defined tag constant in the tag's default IFD. * * @param tagId a tag constant, e.g. {@link #TAG_IMAGE_WIDTH}. * @param val the tag's value. * @return an ExifTag object. */ public ExifTag buildTag( int tagId, Object val ) { int ifdId = getTrueIfd( tagId ); return buildTag( tagId, ifdId, val ); }
/** * Creates a tag for a defined tag constant in the tag's default IFD. * * @param tagId a tag constant, e.g. {@link #TAG_IMAGE_WIDTH}. * @param val the tag's value. * @return an ExifTag object. */ public ExifTag buildTag( int tagId, Object val ) { int ifdId = getTrueIfd( tagId ); return buildTag( tagId, ifdId, val ); }
/** * 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 ); }
/** * 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 ); }
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 ); }