protected int getTagDefinitionForTag( short tagId, short type, int count, int ifd ) { int[] defs = getTagDefinitionsForTagId( tagId ); if( defs == null ) { return TAG_NULL; } SparseIntArray infos = getTagInfo(); int ret = TAG_NULL; for( int i : defs ) { int info = infos.get( i ); short def_type = getTypeFromInfo( info ); int def_count = getComponentCountFromInfo( info ); int[] def_ifds = getAllowedIfdsFromInfo( info ); boolean valid_ifd = false; for( int j : def_ifds ) { if( j == ifd ) { valid_ifd = true; break; } } if( valid_ifd && type == def_type && ( count == def_count || def_count == ExifTag.SIZE_UNDEFINED ) ) { ret = i; break; } } return ret; }
protected int getTagDefinitionForTag( short tagId, short type, int count, int ifd ) { int[] defs = getTagDefinitionsForTagId( tagId ); if( defs == null ) { return TAG_NULL; } SparseIntArray infos = getTagInfo(); int ret = TAG_NULL; for( int i : defs ) { int info = infos.get( i ); short def_type = getTypeFromInfo( info ); int def_count = getComponentCountFromInfo( info ); int[] def_ifds = getAllowedIfdsFromInfo( info ); boolean valid_ifd = false; for( int j : def_ifds ) { if( j == ifd ) { valid_ifd = true; break; } } if( valid_ifd && type == def_type && ( count == def_count || def_count == ExifTag.SIZE_UNDEFINED ) ) { ret = i; break; } } return ret; }