/** * Check if thumbnail is compressed. * * @return true if the thumbnail is compressed. */ @SuppressWarnings( "unused" ) public boolean isThumbnailCompressed() { return mData.hasCompressedThumbnail(); }
/** * Check if thumbnail exists. * * @return true if a compressed thumbnail exists. */ public boolean hasThumbnail() { // TODO: add back in uncompressed strip return mData.hasCompressedThumbnail(); }
/** * Check if thumbnail is compressed. * * @return true if the thumbnail is compressed. */ @SuppressWarnings( "unused" ) public boolean isThumbnailCompressed() { return mData.hasCompressedThumbnail(); }
/** * Check if thumbnail exists. * * @return true if a compressed thumbnail exists. */ public boolean hasThumbnail() { // TODO: add back in uncompressed strip return mData.hasCompressedThumbnail(); }
/** * 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 ) ); } } }
if( mExifData.hasCompressedThumbnail() ) {
if( mExifData.hasCompressedThumbnail() ) {
if( mExifData.hasCompressedThumbnail() ) { ifd1.getTag( ExifInterface.getTrueTagKey( ExifInterface.TAG_JPEG_INTERCHANGE_FORMAT ) ).setValue( offset ); offset += mExifData.getCompressedThumbnail().length;
if( mExifData.hasCompressedThumbnail() ) { ifd1.getTag( ExifInterface.getTrueTagKey( ExifInterface.TAG_JPEG_INTERCHANGE_FORMAT ) ).setValue( offset ); offset += mExifData.getCompressedThumbnail().length;