/** * Gets the total data size in bytes of the value of this tag. */ public int getDataSize() { return getComponentCount() * getElementSize( getDataType() ); }
/** * Gets the total data size in bytes of the value of this tag. */ public int getDataSize() { return getComponentCount() * getElementSize( getDataType() ); }
@SuppressWarnings( "unused" ) protected int getTagDefinitionForTag( ExifTag tag ) { short type = tag.getDataType(); int count = tag.getComponentCount(); int ifd = tag.getIfd(); return getTagDefinitionForTag( tag.getTagId(), type, count, ifd ); }
@SuppressWarnings( "unused" ) protected int getTagDefinitionForTag( ExifTag tag ) { short type = tag.getDataType(); int count = tag.getComponentCount(); int ifd = tag.getIfd(); return getTagDefinitionForTag( tag.getTagId(), type, count, ifd ); }
ExifTagEvent tagEvent = (ExifTagEvent) event; mTag = tagEvent.tag; if( mTag.getDataType() != ExifTag.TYPE_UNDEFINED ) { readFullTagValue( mTag ); checkOffsetOrImageTag( mTag );
ExifTagEvent tagEvent = (ExifTagEvent) event; mTag = tagEvent.tag; if( mTag.getDataType() != ExifTag.TYPE_UNDEFINED ) { readFullTagValue( mTag ); checkOffsetOrImageTag( mTag );
protected void readFullTagValue( final ExifTag tag ) throws IOException { short type = tag.getDataType(); final int componentCount = tag.getComponentCount(); switch( tag.getDataType() ) { case ExifTag.TYPE_UNSIGNED_BYTE: case ExifTag.TYPE_UNDEFINED: {
protected void readFullTagValue( final ExifTag tag ) throws IOException { short type = tag.getDataType(); final int componentCount = tag.getComponentCount(); switch( tag.getDataType() ) { case ExifTag.TYPE_UNSIGNED_BYTE: case ExifTag.TYPE_UNDEFINED: {
private void writeIfd( IfdData ifd, OrderedDataOutputStream dataOutputStream ) throws IOException { ExifTag[] tags = ifd.getAllTags(); dataOutputStream.writeShort( (short) tags.length ); for( ExifTag tag : tags ) { dataOutputStream.writeShort( tag.getTagId() ); dataOutputStream.writeShort( tag.getDataType() ); dataOutputStream.writeInt( tag.getComponentCount() ); // Log.v( TAG, "\n" + tag.toString() ); if( tag.getDataSize() > 4 ) { dataOutputStream.writeInt( tag.getOffset() ); } else { ExifOutputStream.writeTagValue( tag, dataOutputStream ); for( int i = 0, n = 4 - tag.getDataSize(); i < n; i++ ) { dataOutputStream.write( 0 ); } } } dataOutputStream.writeInt( ifd.getOffsetToNextIfd() ); for( ExifTag tag : tags ) { if( tag.getDataSize() > 4 ) { ExifOutputStream.writeTagValue( tag, dataOutputStream ); } } }
private void writeIfd( IfdData ifd, OrderedDataOutputStream dataOutputStream ) throws IOException { ExifTag[] tags = ifd.getAllTags(); dataOutputStream.writeShort( (short) tags.length ); for( ExifTag tag : tags ) { dataOutputStream.writeShort( tag.getTagId() ); dataOutputStream.writeShort( tag.getDataType() ); dataOutputStream.writeInt( tag.getComponentCount() ); // Log.v( TAG, "\n" + tag.toString() ); if( tag.getDataSize() > 4 ) { dataOutputStream.writeInt( tag.getOffset() ); } else { ExifOutputStream.writeTagValue( tag, dataOutputStream ); for( int i = 0, n = 4 - tag.getDataSize(); i < n; i++ ) { dataOutputStream.write( 0 ); } } } dataOutputStream.writeInt( ifd.getOffsetToNextIfd() ); for( ExifTag tag : tags ) { if( tag.getDataSize() > 4 ) { ExifOutputStream.writeTagValue( tag, dataOutputStream ); } } }
static void writeTagValue( ExifTag tag, OrderedDataOutputStream dataOutputStream ) throws IOException { switch( tag.getDataType() ) { case ExifTag.TYPE_ASCII: byte buf[] = tag.getStringByte();
static void writeTagValue( ExifTag tag, OrderedDataOutputStream dataOutputStream ) throws IOException { switch( tag.getDataType() ) { case ExifTag.TYPE_ASCII: byte buf[] = tag.getStringByte();
case ExifParser.EVENT_VALUE_OF_REGISTERED_TAG: tag = parser.getTag(); if( tag.getDataType() == ExifTag.TYPE_UNDEFINED ) { parser.readFullTagValue( tag );
case ExifParser.EVENT_VALUE_OF_REGISTERED_TAG: tag = parser.getTag(); if( tag.getDataType() == ExifTag.TYPE_UNDEFINED ) { parser.readFullTagValue( tag );
if( tag.hasValue() ) { for( int i = 0; i < tag.getComponentCount(); i++ ) { if( tag.getDataType() == ExifTag.TYPE_UNSIGNED_SHORT ) { registerUncompressedStrip( i, tag.getValueAt( i ) );
if( tag.hasValue() ) { for( int i = 0; i < tag.getComponentCount(); i++ ) { if( tag.getDataType() == ExifTag.TYPE_UNSIGNED_SHORT ) { registerUncompressedStrip( i, tag.getValueAt( i ) );