java.lang.Object | |
↳ | android.media.ExifInterface |
This is a class for reading and writing Exif tags in a JPEG file.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Reads Exif tags from the specified JPEG file.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
Return the altitude in meters.
|
||||||||||
|
Returns the value of the specified tag or
null
if there
is no such tag in the JPEG file.
|
||||||||||
|
Returns the double value of the specified rational tag.
|
||||||||||
|
Returns the integer value of the specified tag.
|
||||||||||
|
Stores the latitude and longitude value in a float array.
|
||||||||||
|
Returns the thumbnail inside the JPEG file, or
null
if there is no thumbnail.
|
||||||||||
|
Returns true if the JPEG file has a thumbnail.
|
||||||||||
|
Save the tag data into the JPEG file.
|
||||||||||
|
Set the value of the specified tag.
|
[Expand]
Inherited Methods
|
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Type is String.
Type is String.
Type is String.
Type is rational.
The altitude (in meters) based on the reference in TAG_GPS_ALTITUDE_REF. Type is rational.
0 if the altitude is above sea level. 1 if the altitude is below sea level. Type is int.
Type is String.
String. Format is "num1/denom1,num2/denom2,num3/denom3".
Type is String.
String. Format is "num1/denom1,num2/denom2,num3/denom3".
Type is String.
Type is String. Name of GPS processing method used for location finding.
Type is String.
Type is int.
Type is int.
Type is String.
Type is int.
Type is int.
Reads Exif tags from the specified JPEG file.
IOException |
---|
Return the altitude in meters. If the exif tag does not exist, return defaultValue .
defaultValue | the value to return if the tag is not available. |
---|
Returns the value of the specified tag or
null
if there
is no such tag in the JPEG file.
tag | the name of the tag. |
---|
Returns the double value of the specified rational tag. If there is no such tag in the JPEG file or the value cannot be parsed as double, return defaultValue .
tag | the name of the tag. |
---|---|
defaultValue | the value to return if the tag is not available. |
Returns the integer value of the specified tag. If there is no such tag in the JPEG file or the value cannot be parsed as integer, return defaultValue .
tag | the name of the tag. |
---|---|
defaultValue | the value to return if the tag is not available. |
Stores the latitude and longitude value in a float array. The first element is the latitude, and the second element is the longitude. Returns false if the Exif tags are not available.
Returns the thumbnail inside the JPEG file, or
null
if there is no thumbnail.
The returned data is in JPEG format and can be decoded using
decodeByteArray(byte[], int, int)
Save the tag data into the JPEG file. This is expensive because it involves
copying all the JPG data from one file to another and deleting the old file
and renaming the other. It's best to use
setAttribute(String, String)
to set all attributes to write and make a single call rather than multiple
calls for each attribute.
IOException |
---|
Set the value of the specified tag.
tag | the name of the tag. |
---|---|
value | the value of the tag. |