/** * Returns the thumbnail from IFD1 as a bitmap, or null if none exists. * * @return the thumbnail as a bitmap. */ public Bitmap getThumbnailBitmap() { if( mData.hasCompressedThumbnail() ) { byte[] thumb = mData.getCompressedThumbnail(); return BitmapFactory.decodeByteArray( thumb, 0, thumb.length ); } else if( mData.hasUncompressedStrip() ) { // TODO: implement uncompressed } return null; }
/** * Returns the thumbnail from IFD1 as a bitmap, or null if none exists. * * @return the thumbnail as a bitmap. */ public Bitmap getThumbnailBitmap() { if( mData.hasCompressedThumbnail() ) { byte[] thumb = mData.getCompressedThumbnail(); return BitmapFactory.decodeByteArray( thumb, 0, thumb.length ); } else if( mData.hasUncompressedStrip() ) { // TODO: implement uncompressed } return null; }
/** * Returns the thumbnail from IFD1 as a byte array, or null if none exists. * The bytes may either be an uncompressed strip as specified in the exif * standard or a jpeg compressed image. * * @return the thumbnail as a byte array. */ @SuppressWarnings( "unused" ) public byte[] getThumbnailBytes() { if( mData.hasCompressedThumbnail() ) { return mData.getCompressedThumbnail(); } else if( mData.hasUncompressedStrip() ) { // TODO: implement this } return null; }
/** * Returns the thumbnail from IFD1 as a byte array, or null if none exists. * The bytes may either be an uncompressed strip as specified in the exif * standard or a jpeg compressed image. * * @return the thumbnail as a byte array. */ @SuppressWarnings( "unused" ) public byte[] getThumbnailBytes() { if( mData.hasCompressedThumbnail() ) { return mData.getCompressedThumbnail(); } else if( mData.hasUncompressedStrip() ) { // TODO: implement this } return null; }
private void writeThumbnail( OrderedDataOutputStream dataOutputStream ) throws IOException { if( mExifData.hasCompressedThumbnail() ) { Log.d( TAG, "writing thumbnail.." ); dataOutputStream.write( mExifData.getCompressedThumbnail() ); } else if( mExifData.hasUncompressedStrip() ) { Log.d( TAG, "writing uncompressed strip.." ); for( int i = 0; i < mExifData.getStripCount(); i++ ) { dataOutputStream.write( mExifData.getStrip( i ) ); } } }
private void writeThumbnail( OrderedDataOutputStream dataOutputStream ) throws IOException { if( mExifData.hasCompressedThumbnail() ) { Log.d( TAG, "writing thumbnail.." ); dataOutputStream.write( mExifData.getCompressedThumbnail() ); } else if( mExifData.hasUncompressedStrip() ) { Log.d( TAG, "writing uncompressed strip.." ); for( int i = 0; i < mExifData.getStripCount(); i++ ) { dataOutputStream.write( mExifData.getStrip( i ) ); } } }
ifd1.removeTag( ExifInterface.getTrueTagKey( ExifInterface.TAG_STRIP_BYTE_COUNTS ) ); else if( mExifData.hasUncompressedStrip() ) { if( ifd1 == null ) { ifd1 = new IfdData( IfdId.TYPE_IFD_1 );
ifd1.removeTag( ExifInterface.getTrueTagKey( ExifInterface.TAG_STRIP_BYTE_COUNTS ) ); else if( mExifData.hasUncompressedStrip() ) { if( ifd1 == null ) { ifd1 = new IfdData( IfdId.TYPE_IFD_1 );
offset += mExifData.getCompressedThumbnail().length; else if( mExifData.hasUncompressedStrip() ) { int stripCount = mExifData.getStripCount(); long[] offsets = new long[stripCount];
offset += mExifData.getCompressedThumbnail().length; else if( mExifData.hasUncompressedStrip() ) { int stripCount = mExifData.getStripCount(); long[] offsets = new long[stripCount];