public class Exify
extends java.lang.Object
ExifTagInfo
Modifier and Type | Class and Description |
---|---|
static interface |
Exify.ColorSpace
Constants for
#ExifTagKey.COLOR_SPACE |
static interface |
Exify.ComponentsConfiguration
Constants for
#ExifTagKey.COMPONENTS_CONFIGURATION |
static interface |
Exify.Compression
Constants for
#ExifTagKey.COMPRESSION |
static interface |
Exify.Contrast
Constants for
#ExifTagKey.CONTRAST |
static interface |
Exify.ExposureMode
Constants for
#ExifTagKey.EXPOSURE_MODE |
static interface |
Exify.ExposureProgram
Constants for
#ExifTagKey.EXPOSURE_PROGRAM |
static interface |
Exify.FileSource
Constants for
#ExifTagKey.FILE_SOURCE |
static interface |
Exify.Flash
Constants for
#ExifTagKey.FLASH As the definition in Jeita EXIF 2.2 |
static interface |
Exify.GainControl
Constants for
#ExifTagKey.GAIN_CONTROL |
static interface |
Exify.GpsAltitudeRef
Constants for
#ExifTagKey.GPS_ALTITUDE_REF |
static interface |
Exify.GpsDifferential
Constants for
#ExifTagKey.GPS_DIFFERENTIAL |
static interface |
Exify.GpsLatitudeRef
Constants for
#ExifTagKey.GPS_LATITUDE_REF ,
#ExifTagKey.GPS_DEST_LATITUDE_REF |
static interface |
Exify.GpsLongitudeRef
Constants for
#ExifTagKey.GPS_LONGITUDE_REF ,
#ExifTagKey.GPS_DEST_LONGITUDE_REF |
static interface |
Exify.GpsMeasureMode
Constants for
#ExifTagKey.GPS_MEASURE_MODE |
static interface |
Exify.GpsSpeedRef
Constants for
#ExifTagKey.GPS_SPEED_REF ,
#ExifTagKey.GPS_DEST_DISTANCE_REF |
static interface |
Exify.GpsStatus
Constants for
#ExifTagKey.GPS_STATUS |
static interface |
Exify.GpsTrackRef
Constants for
#ExifTagKey.GPS_TRACK_REF ,
#ExifTagKey.GPS_IMG_DIRECTION_REF , #ExifTagKey.GPS_DEST_BEARING_REF |
static interface |
Exify.JpegProcess
Constants for the jpeg process algorithm used.
|
static interface |
Exify.LightSource
Constants for
#ExifTagKey.LIGHT_SOURCE |
static interface |
Exify.MeteringMode
Constants for
#ExifTagKey.METERING_MODE |
static interface |
Exify.Options
|
static interface |
Exify.Orientation
Constants for
#ExifTagKey.ORIENTATION . |
static interface |
Exify.PhotometricInterpretation
Constants for
#ExifTagKey.PHOTOMETRIC_INTERPRETATION |
static interface |
Exify.PlanarConfiguration
Constants for
#ExifTagKey.PLANAR_CONFIGURATION |
static interface |
Exify.ResolutionUnit
Constants for
#ExifTagKey.RESOLUTION_UNIT |
static interface |
Exify.Saturation
Constants for
#ExifTagKey.SATURATION |
static interface |
Exify.SceneCapture
Constants for
#ExifTagKey.SCENE_CAPTURE_TYPE |
static interface |
Exify.SceneType
Constants for
#ExifTagKey.SCENE_TYPE |
static interface |
Exify.SensingMethod
Constants for
#ExifTagKey.SENSING_METHOD |
static interface |
Exify.SensitivityType
Constants for the
#ExifTagKey.SENSITIVITY_TYPE tag |
static interface |
Exify.Sharpness
Constants for
#ExifTagKey.SHARPNESS |
static interface |
Exify.SubjectDistance
Constants for
#ExifTagKey.SUBJECT_DISTANCE |
static class |
Exify.TAG |
static interface |
Exify.WhiteBalance
Constants for
#ExifTagKey.WHITE_BALANCE |
static interface |
Exify.YCbCrPositioning
Constants for
#ExifTagKey.Y_CB_CR_POSITIONING |
Modifier and Type | Field and Description |
---|---|
static java.nio.ByteOrder |
DEFAULT_BYTE_ORDER |
static int |
DEFINITION_NULL |
static int |
IFD_NULL |
protected static java.util.HashSet<java.lang.Short> |
sBannedDefines
Tags with definitions that cannot be overridden (banned defines).
|
static int |
TAG_NULL |
Constructor and Description |
---|
Exify() |
Modifier and Type | Method and Description |
---|---|
boolean |
addDateTimeStampTag(Exify.TAG tag,
long timestamp,
java.util.TimeZone timezone)
Creates, formats, and sets the DateTimeStamp tag for one of:
#ExifTagKey.DATE_TIME , #ExifTagKey.DATE_TIME_DIGITIZED ,
#ExifTagKey.DATE_TIME_ORIGINAL . |
boolean |
addGpsDateTimeStampTag(long timestamp)
Creates and sets the GPS timestamp ExifTagKey.
|
boolean |
addGpsTags(double latitude,
double longitude)
Creates and sets all to the GPS tags for a give latitude and longitude.
|
ExifTagInfo |
buildTag(Exify.TAG tag,
java.lang.Object val)
Creates a tag for a defined tag constant in the tag's default IFD.
|
ExifTagInfo |
buildTag(int tagId,
int ifdId,
java.lang.Object val)
Creates a tag for a defined tag constant in a given IFD if that IFD is
allowed for the ExifTagKey.
|
protected ExifTagInfo |
buildUninitializedTag(Exify.TAG tag) |
protected ExifTagInfo |
buildUninitializedTag(int tagId) |
void |
clearExif()
Clears this ExifInterface object's existing exif tags.
|
protected static void |
closeSilently(java.io.Closeable c) |
static double |
convertLatOrLongToDouble(Rational[] coordinate,
java.lang.String reference)
Gets the double representation of the GPS latitude or longitude
coordinate.
|
static int |
defineTag(int ifdId,
short tagId)
Returns the constant representing a tag with a given TID and default IFD.
|
void |
deleteTag(Exify.TAG tag)
Removes the ExifTag for a tag constant from that tag's default IFD.
|
void |
deleteTag(int tagId)
Removes the ExifTag for a tag constant from that tag's default IFD.
|
void |
deleteTag(int tagId,
int ifdId)
Removes the ExifTag for a tag constant from the given IFD.
|
int |
getActualTagCount(int tagId,
int ifdId)
Gets the number of elements for an ExifTag in a given IFD.
|
protected static int |
getAllowedIfdFlagsFromInfo(int info) |
protected static int[] |
getAllowedIfdsFromInfo(int info) |
java.util.List<ExifTagInfo> |
getAllTags()
Get the exif tags in this ExifInterface object or null if none exist.
|
double |
getAltitude(double defaultValue)
Return the altitude in meters.
|
double |
getApertureSize()
Return the aperture size, if present, 0 if missing
|
protected static int |
getComponentCountFromInfo(int info) |
static java.util.Date |
getDateTime(java.lang.String dateTimeString,
java.util.TimeZone timeZone)
Given an exif date time, like
#ExifTagKey.DATE_TIME or #ExifTagKey.DATE_TIME_DIGITIZED
returns a java Date object |
int |
getDefinedTagCount(Exify.TAG tag)
Gets the defined number of elements for a ExifTagKey.
|
int |
getDefinedTagCount(int tagId)
Gets the defined number of elements for a ExifTagKey.
|
int |
getDefinedTagDefaultIfd(int tagId)
Gets the default IFD for a ExifTagKey.
|
short |
getDefinedTagType(int tagId)
Gets the defined type for a ExifTagKey.
|
protected static int |
getFlagsFromAllowedIfds(int[] allowedIfds) |
int[] |
getImageSize()
Returns the Image size as decoded from the SOF marker
|
short |
getJpegProcess()
this gives information about the process used to create the JPEG file.
|
java.lang.String |
getLatitude()
Returns a formatted String with the latitude representation:
39° 8' 16.8" N |
double[] |
getLatLongAsDoubles()
Gets the GPS latitude and longitude as a pair of doubles from this
ExifInterface object's tags, or null if the necessary tags do not exist.
|
java.lang.String |
getLensModelDescription()
Returns the lens model as string if any of the tags
#ExifTagKey.LENS_MODEL
or #ExifTagKey.LENS_SPECS are found |
java.lang.String |
getLongitude()
Returns a formatted String with the longitude representation:
77° 37' 51.6" W |
static short |
getOrientationValueForRotation(int degrees)
Returns the Orientation ExifTag value for a given number of degrees.
|
int |
getQualityGuess()
Returns the JPEG quality used to generate the image
or 0 if not found
|
double |
getResolutionUnit(int resolution)
Given the value from
#ExifTagKey.FOCAL_PLANE_RESOLUTION_UNIT or #ExifTagKey.RESOLUTION_UNIT
this method will return the corresponding value in millimeters |
static int |
getRotationForOrientationValue(short orientation)
Returns the rotation degrees corresponding to an ExifTag Orientation
value.
|
ExifTagInfo |
getTag(Exify.TAG tag)
Returns the ExifTag in that tag's default IFD for a defined tag constant
or null if none exists.
|
ExifTagInfo |
getTag(int tagId)
Returns the ExifTag in that tag's default IFD for a defined tag constant
or null if none exists.
|
ExifTagInfo |
getTag(int tagId,
int ifdId)
Gets an ExifTag for an IFD other than the tag's default.
|
java.lang.Byte |
getTagByteValue(Exify.TAG tag) |
java.lang.Byte |
getTagByteValue(int tagId) |
java.lang.Byte |
getTagByteValue(int tagId,
int ifdId) |
byte[] |
getTagByteValues(Exify.TAG tag) |
byte[] |
getTagByteValues(int tagId) |
byte[] |
getTagByteValues(int tagId,
int ifdId) |
protected int |
getTagDefinition(short tagId,
int defaultIfd) |
protected int |
getTagDefinitionForTag(ExifTagInfo tag) |
protected int |
getTagDefinitionForTag(short tagId,
short type,
int count,
int ifd) |
protected int[] |
getTagDefinitionsForTagId(short tagId) |
protected android.util.SparseIntArray |
getTagInfo() |
java.lang.Integer |
getTagIntValue(Exify.TAG tag) |
java.lang.Integer |
getTagIntValue(int tagId) |
java.lang.Integer |
getTagIntValue(int tagId,
int ifdId) |
int[] |
getTagIntValues(Exify.TAG tag) |
int[] |
getTagIntValues(int tagId) |
int[] |
getTagIntValues(int tagId,
int ifdId) |
java.lang.Long |
getTagLongValue(Exify.TAG tag) |
java.lang.Long |
getTagLongValue(int tagId) |
java.lang.Long |
getTagLongValue(int tagId,
int ifdId) |
long[] |
getTagLongValues(Exify.TAG tag) |
long[] |
getTagLongValues(int tagId) |
long[] |
getTagLongValues(int tagId,
int ifdId) |
Rational |
getTagRationalValue(Exify.TAG tag) |
Rational |
getTagRationalValue(int tagId) |
Rational |
getTagRationalValue(int tagId,
int ifdId) |
Rational[] |
getTagRationalValues(Exify.TAG tag) |
Rational[] |
getTagRationalValues(int tagId) |
Rational[] |
getTagRationalValues(int tagId,
int ifdId) |
java.util.List<ExifTagInfo> |
getTagsForIfdId(int ifdId)
Returns a list of ExifTags that share an IFD (which can be obtained by
calling
getTrueIfd(int) on a defined tag constant) or null if none
exist. |
java.util.List<ExifTagInfo> |
getTagsForTagId(short tagId)
Returns a list of ExifTags that share a TID (which can be obtained by
calling
getTrueTagKey(ly.img.android.pesdk.backend.exif.Exify.TAG) on a defined tag constant) or null if none
exist. |
java.lang.String |
getTagStringValue(Exify.TAG tag) |
java.lang.String |
getTagStringValue(int tagId) |
java.lang.String |
getTagStringValue(int tagId,
int ifdId) |
java.lang.Object |
getTagValue(Exify.TAG tag)
Returns the value of the ExifTag in that tag's default IFD for a defined
tag constant or null if none exists or the value could not be cast into
the return type.
|
java.lang.Object |
getTagValue(int tagId)
Returns the value of the ExifTag in that tag's default IFD for a defined
tag constant or null if none exists or the value could not be cast into
the return type.
|
java.lang.Object |
getTagValue(int tagId,
int ifdId)
Gets a tag value for an IFD other than the tag's default.
|
byte[] |
getThumbnail()
Returns the thumbnail if it is jpeg compressed, or null if none exists.
|
android.graphics.Bitmap |
getThumbnailBitmap()
Returns the thumbnail from IFD1 as a bitmap, or null if none exists.
|
byte[] |
getThumbnailBytes()
Returns the thumbnail from IFD1 as a byte array, or null if none exists.
|
static int |
getTrueIfd(Exify.TAG tag)
Returns the default IFD for a tag constant.
|
static int |
getTrueIfd(int tag)
Returns the default IFD for a tag constant.
|
static short |
getTrueTagKey(Exify.TAG tag)
Returns the TID for a tag constant.
|
static short |
getTrueTagKey(int tag)
Returns the TID for a tag constant.
|
protected static short |
getTypeFromInfo(int info) |
java.lang.String |
getUserComment()
Decodes the user comment tag into string as specified in the EXIF
standard.
|
boolean |
hasThumbnail()
Check if thumbnail exists.
|
protected static boolean |
isIfdAllowed(int info,
int ifd) |
protected static boolean |
isOffsetTag(short tag)
Returns true if tag TID is one of the following:
#ExifTagKey.EXIF_IFD ,
#ExifTagKey.GPS_IFD , #ExifTagKey.JPEG_INTERCHANGE_FORMAT ,
#ExifTagKey.STRIP_OFFSETS , #ExifTagKey.INTEROPERABILITY_IFD
Note: defining tags with these TID's is disallowed. |
boolean |
isTagCountDefined(int tagId)
Checks whether a tag has a defined number of elements.
|
boolean |
isThumbnailCompressed()
Check if thumbnail is compressed.
|
void |
readExif(byte[] jpeg,
int options)
Reads the exif tags from a byte array, clearing this ExifInterface
object's existing exif tags.
|
void |
readExif(java.io.InputStream inStream,
int options)
Reads the exif tags from an InputStream, clearing this ExifInterface
object's existing exif tags.
|
void |
readExif(java.lang.String inFileName,
int options)
Reads the exif tags from a file, clearing this ExifInterface object's
existing exif tags.
|
void |
removeCompressedThumbnail()
Clears the compressed thumbnail if it exists.
|
void |
removeTagDefinition(int tagId)
Removes a tag definition for given defined tag constant.
|
void |
resetTagDefinitions()
Resets tag definitions to the default ones.
|
boolean |
setCompressedThumbnail(android.graphics.Bitmap thumb)
Sets the thumbnail to be a jpeg compressed bitmap.
|
boolean |
setCompressedThumbnail(byte[] thumb)
Sets the thumbnail to be a jpeg compressed image.
|
void |
setExif(java.util.Collection<ExifTagInfo> tags)
Sets the exif tags, clearing this ExifInterface object's existing exif
tags.
|
ExifTagInfo |
setTag(ExifTagInfo tag)
Puts an ExifTag into this ExifInterface object's tags, removing a
previous ExifTag with the same TID and IFD.
|
int |
setTagDefinition(short tagId,
int defaultIfd,
short tagType,
short defaultComponentCount,
int[] allowedIfds)
Creates a new tag definition in this ExifInterface object for a given TID
and default IFD.
|
void |
setTags(java.util.Collection<ExifTagInfo> tags)
Puts a collection of ExifTags into this ExifInterface objects's tags.
|
boolean |
setTagValue(Exify.TAG tag,
java.lang.Object val)
Sets the value of an ExifTag if it exists it's default IFD.
|
boolean |
setTagValue(int tagId,
int ifdId,
java.lang.Object val)
Sets the value of an ExifTag if it exists in the given IFD.
|
boolean |
setTagValue(int tagId,
java.lang.Object val)
Sets the value of an ExifTag if it exists it's default IFD.
|
static byte[] |
toBitArray(short value) |
void |
writeExif(android.graphics.Bitmap input,
java.lang.String dstFilename,
int quality) |
void |
writeExif(java.io.InputStream input,
java.lang.String dstFilename) |
void |
writeExif(java.lang.String dstFilename) |
void |
writeExif(java.lang.String srcFilename,
java.lang.String dstFilename) |
public static final int TAG_NULL
public static final int IFD_NULL
public static final int DEFINITION_NULL
public static final java.nio.ByteOrder DEFAULT_BYTE_ORDER
protected static java.util.HashSet<java.lang.Short> sBannedDefines
protected static boolean isOffsetTag(short tag)
#ExifTagKey.EXIF_IFD
,
#ExifTagKey.GPS_IFD
, #ExifTagKey.JPEG_INTERCHANGE_FORMAT
,
#ExifTagKey.STRIP_OFFSETS
, #ExifTagKey.INTEROPERABILITY_IFD
Note: defining tags with these TID's is disallowed.tag
- a tag's TID (can be obtained from a defined tag constant with
getTrueTagKey(ly.img.android.pesdk.backend.exif.Exify.TAG)
).public static short getOrientationValueForRotation(int degrees)
degrees
- the amount an image is rotated in degrees.public static int getRotationForOrientationValue(short orientation)
orientation
- the ExifTag Orientation value.public static double convertLatOrLongToDouble(Rational[] coordinate, java.lang.String reference)
coordinate
- an array of 3 Rationals representing the degrees,
minutes, and seconds of the GPS location as defined in the
exif specification.reference
- a GPS reference reperesented by a String containing "N",
"S", "E", or "W".protected static int[] getAllowedIfdsFromInfo(int info)
protected static void closeSilently(java.io.Closeable c)
public static int getTrueIfd(Exify.TAG tag)
public static int getTrueIfd(int tag)
public static short getTrueTagKey(Exify.TAG tag)
public static short getTrueTagKey(int tag)
protected static int getFlagsFromAllowedIfds(int[] allowedIfds)
protected static int getComponentCountFromInfo(int info)
protected static short getTypeFromInfo(int info)
public static int defineTag(int ifdId, short tagId)
public static java.util.Date getDateTime(java.lang.String dateTimeString, java.util.TimeZone timeZone)
#ExifTagKey.DATE_TIME
or #ExifTagKey.DATE_TIME_DIGITIZED
returns a java Date objectdateTimeString
- one of the value of #ExifTagKey.DATE_TIME
or #ExifTagKey.DATE_TIME_DIGITIZED
timeZone
- the target timezoneprotected static boolean isIfdAllowed(int info, int ifd)
protected static int getAllowedIfdFlagsFromInfo(int info)
public static byte[] toBitArray(short value)
public double getResolutionUnit(int resolution)
#ExifTagKey.FOCAL_PLANE_RESOLUTION_UNIT
or #ExifTagKey.RESOLUTION_UNIT
this method will return the corresponding value in millimetersresolution
- #ExifTagKey.FOCAL_PLANE_RESOLUTION_UNIT
or #ExifTagKey.RESOLUTION_UNIT
public void readExif(java.lang.String inFileName, int options) throws java.io.IOException
inFileName
- a string representing the filepath to jpeg file.options
- bit flag which defines which type of tags to process, see Exify.Options
java.io.IOException
readExif(InputStream, int)
public void readExif(java.io.InputStream inStream, int options) throws java.io.IOException
ExifInterface exif = new ExifInterface(); exif.readExif( stream, Options.OPTION_IFD_0 | Options.OPTION_IFD_1 | Options.OPTION_IFD_EXIF ); ... // to request all the options use the OPTION_ALL bit mask exif.readExif( stream, Options.OPTION_ALL );
inStream
- an InputStream containing a jpeg compressed image.options
- bit flag which defines which type of tags to process, see Exify.Options
java.io.IOException
public void setExif(java.util.Collection<ExifTagInfo> tags)
tags
- a collection of exif tags to set.public void clearExif()
public void setTags(java.util.Collection<ExifTagInfo> tags)
tags
- a Collection of ExifTags.setTag(ly.img.android.pesdk.backend.exif.ExifTagInfo)
public ExifTagInfo setTag(ExifTagInfo tag)
buildTag(ly.img.android.pesdk.backend.exif.Exify.TAG, java.lang.Object)
.tag
- an ExifTag to put into this ExifInterface's tags.public void writeExif(java.lang.String dstFilename) throws java.io.IOException
java.io.IOException
public void writeExif(java.lang.String srcFilename, java.lang.String dstFilename) throws java.io.IOException
java.io.IOException
public void writeExif(java.io.InputStream input, java.lang.String dstFilename) throws java.io.IOException
java.io.IOException
public void writeExif(android.graphics.Bitmap input, java.lang.String dstFilename, int quality) throws java.io.IOException
java.io.IOException
public java.util.List<ExifTagInfo> getAllTags()
ExifTagInfo
s.public void readExif(byte[] jpeg, int options) throws java.io.IOException
jpeg
- a byte array containing a jpeg compressed image.options
- bit flag which defines which type of tags to process, see Exify.Options
java.io.IOException
readExif(InputStream, int)
public java.util.List<ExifTagInfo> getTagsForTagId(short tagId)
getTrueTagKey(ly.img.android.pesdk.backend.exif.Exify.TAG)
on a defined tag constant) or null if none
exist.tagId
- a TID as defined in the exif standard (or with
defineTag(int, short)
).ExifTagInfo
s.public java.util.List<ExifTagInfo> getTagsForIfdId(int ifdId)
getTrueIfd(int)
on a defined tag constant) or null if none
exist.ifdId
- an IFD as defined in the exif standard (or with
defineTag(int, short)
).ExifTagInfo
s.public ExifTagInfo getTag(int tagId)
tagId
- a defined tag constant, e.g. #ExifTagKey.IMAGE_WIDTH
.ExifTagInfo
or null if none exists.public ExifTagInfo getTag(Exify.TAG tag)
tag
- a defined tag constant, e.g. #ExifTagKey.IMAGE_WIDTH
.ExifTagInfo
or null if none exists.public int getDefinedTagDefaultIfd(int tagId)
tagId
- a defined tag constant, e.g. #ExifTagKey.IMAGE_WIDTH
.IFD_NULL
if no
definition exists.public ExifTagInfo getTag(int tagId, int ifdId)
getTag(int)
protected android.util.SparseIntArray getTagInfo()
public java.lang.Object getTagValue(Exify.TAG tag)
tag
- a defined tag constant, e.g. #ExifTagKey.IMAGE_WIDTH
.public java.lang.Object getTagValue(int tagId)
tagId
- a defined tag constant, e.g. #ExifTagKey.IMAGE_WIDTH
.public java.lang.Object getTagValue(int tagId, int ifdId)
public java.lang.String getTagStringValue(int tagId, int ifdId)
public java.lang.String getTagStringValue(int tagId)
public java.lang.String getTagStringValue(Exify.TAG tag)
public java.lang.Long getTagLongValue(Exify.TAG tag)
public java.lang.Long getTagLongValue(int tagId)
public java.lang.Long getTagLongValue(int tagId, int ifdId)
public long[] getTagLongValues(int tagId, int ifdId)
public java.lang.Integer getTagIntValue(Exify.TAG tag)
public java.lang.Integer getTagIntValue(int tagId)
public java.lang.Integer getTagIntValue(int tagId, int ifdId)
public int[] getTagIntValues(int tagId, int ifdId)
public java.lang.Byte getTagByteValue(Exify.TAG tag)
public java.lang.Byte getTagByteValue(int tagId)
public java.lang.Byte getTagByteValue(int tagId, int ifdId)
public byte[] getTagByteValues(int tagId, int ifdId)
public Rational getTagRationalValue(int tagId)
public Rational getTagRationalValue(int tagId, int ifdId)
public Rational[] getTagRationalValues(int tagId, int ifdId)
public long[] getTagLongValues(int tagId)
public int[] getTagIntValues(int tagId)
public byte[] getTagByteValues(int tagId)
public Rational[] getTagRationalValues(int tagId)
public long[] getTagLongValues(Exify.TAG tag)
public int[] getTagIntValues(Exify.TAG tag)
public byte[] getTagByteValues(Exify.TAG tag)
public boolean isTagCountDefined(int tagId)
tagId
- a defined tag constant, e.g. #ExifTagKey.IMAGE_WIDTH
.public int getDefinedTagCount(Exify.TAG tag)
tag
- a defined tag constant, e.g. #ExifTagKey.IMAGE_WIDTH
.ExifTagInfo.SIZE_UNDEFINED
if the
tag or the number of elements is not defined.public int getDefinedTagCount(int tagId)
tagId
- a defined tag constant, e.g. #ExifTagKey.IMAGE_WIDTH
.ExifTagInfo.SIZE_UNDEFINED
if the
tag or the number of elements is not defined.public int getActualTagCount(int tagId, int ifdId)
tagId
- a defined tag constant, e.g. #ExifTagKey.IMAGE_WIDTH
.ifdId
- the IFD containing the ExifTag to check.public short getDefinedTagType(int tagId)
tagId
- a defined tag constant, e.g. #ExifTagKey.IMAGE_WIDTH
.ExifTagInfo.getDataType()
protected ExifTagInfo buildUninitializedTag(Exify.TAG tag)
protected ExifTagInfo buildUninitializedTag(int tagId)
public boolean setTagValue(Exify.TAG tag, java.lang.Object val)
tag
- a tag constant, e.g. #ExifTagKey.IMAGE_WIDTH
.val
- the value to set.public boolean setTagValue(int tagId, java.lang.Object val)
tagId
- a tag constant, e.g. #ExifTagKey.IMAGE_WIDTH
.val
- the value to set.public boolean setTagValue(int tagId, int ifdId, java.lang.Object val)
tagId
- a tag constant, e.g. #ExifTagKey.IMAGE_WIDTH
.ifdId
- the IFD that the ExifTag is in.val
- the value to set.setTagValue(ly.img.android.pesdk.backend.exif.Exify.TAG, java.lang.Object)
public void deleteTag(Exify.TAG tag)
tag
- a tag constant, e.g. #ExifTagKey.IMAGE_WIDTH
.public void deleteTag(int tagId)
tagId
- a tag constant, e.g. #ExifTagKey.IMAGE_WIDTH
.public void deleteTag(int tagId, int ifdId)
tagId
- a tag constant, e.g. #ExifTagKey.IMAGE_WIDTH
.ifdId
- the IFD of the ExifTag to remove.public int setTagDefinition(short tagId, int defaultIfd, short tagType, short defaultComponentCount, int[] allowedIfds)
tagId
- the TID for the ExifTagKey.defaultIfd
- the default IFD for the ExifTagKey.tagType
- the type of the tag (see ExifTagInfo.getDataType()
).defaultComponentCount
- the number of elements of this tag's type in
the tags value.allowedIfds
- the IFD's this tag is allowed to be put in.#ExifTagKey.IMAGE_WIDTH
) or
#ExifTagKey.NULL
if the definition could not be made.protected int getTagDefinition(short tagId, int defaultIfd)
protected int[] getTagDefinitionsForTagId(short tagId)
protected int getTagDefinitionForTag(ExifTagInfo tag)
protected int getTagDefinitionForTag(short tagId, short type, int count, int ifd)
public void removeTagDefinition(int tagId)
tagId
- a defined tag constant, e.g. #ExifTagKey.IMAGE_WIDTH
.public void resetTagDefinitions()
public android.graphics.Bitmap getThumbnailBitmap()
public byte[] getThumbnailBytes()
public byte[] getThumbnail()
public int getQualityGuess()
public short getJpegProcess()
public int[] getImageSize()
public boolean isThumbnailCompressed()
public boolean hasThumbnail()
public boolean setCompressedThumbnail(android.graphics.Bitmap thumb)
thumb
- a bitmap to compress to a jpeg thumbnail.public boolean setCompressedThumbnail(byte[] thumb)
thumb
- a byte array containing a jpeg compressed image.public void removeCompressedThumbnail()
public java.lang.String getUserComment()
public double getAltitude(double defaultValue)
defaultValue
- the value to return if the tag is not available.public double[] getLatLongAsDoubles()
convertLatOrLongToDouble(ly.img.android.pesdk.backend.exif.Rational[], java.lang.String)
public java.lang.String getLatitude()
public java.lang.String getLongitude()
public boolean addDateTimeStampTag(Exify.TAG tag, long timestamp, java.util.TimeZone timezone)
#ExifTagKey.DATE_TIME
, #ExifTagKey.DATE_TIME_DIGITIZED
,
#ExifTagKey.DATE_TIME_ORIGINAL
.tag
- one of the DateTimeStamp tags.timestamp
- a timestamp to format.timezone
- a TimeZone object.public ExifTagInfo buildTag(Exify.TAG tag, java.lang.Object val)
tag
- a tag constant, e.g. #ExifTagKey.IMAGE_WIDTH
.val
- the tag's value.public ExifTagInfo buildTag(int tagId, int ifdId, java.lang.Object val)
ExifTagInfo.setValue(int[])
for this tag's datatype would fail.tagId
- a tag constant, e.g. #ExifTagKey.IMAGE_WIDTH
.ifdId
- the IFD that the tag should be in.val
- the value of the tag to set.buildTag(ly.img.android.pesdk.backend.exif.Exify.TAG, java.lang.Object)
public boolean addGpsTags(double latitude, double longitude)
latitude
- a GPS latitude coordinate.longitude
- a GPS longitude coordinate.public boolean addGpsDateTimeStampTag(long timestamp)
timestamp
- a GPS timestamp.public double getApertureSize()
public java.lang.String getLensModelDescription()
#ExifTagKey.LENS_MODEL
or #ExifTagKey.LENS_SPECS
are found