SpatiaLite
3.0.0-stable
|
EXIF/image: supporting functions and constants. More...
Go to the source code of this file.
Data Structures | |
struct | gaiaExifTagStruct |
Container for an EXIF tag. More... | |
struct | gaiaExifTagListStruct |
Container for a list of EXIF tags. More... | |
Defines | |
#define | GAIA_HEX_BLOB 0 |
generic hexadecimal BLOB | |
#define | GAIA_GIF_BLOB 1 |
this BLOB does actually contain a GIF image | |
#define | GAIA_PNG_BLOB 2 |
this BLOB does actually containt a PNG image | |
#define | GAIA_JPEG_BLOB 3 |
this BLOB does actually contain a generic JPEG image | |
#define | GAIA_EXIF_BLOB 4 |
this BLOB does actually contain a JPEG-EXIF image | |
#define | GAIA_EXIF_GPS_BLOB 5 |
this BLOB does actually contain a JPEG-EXIF image including GPS data | |
#define | GAIA_ZIP_BLOB 6 |
this BLOB does actually contain a ZIP compressed file | |
#define | GAIA_PDF_BLOB 7 |
this BLOB does actually contain a PDF document | |
#define | GAIA_GEOMETRY_BLOB 8 |
this BLOB does actually contain a SpatiaLite Geometry | |
#define | GAIA_TIFF_BLOB 9 |
this BLOB does actually contain a TIFF image | |
#define | GAIA_EXIF_NONE 0 |
unrecognized EXIF value | |
#define | GAIA_EXIF_BYTE 1 |
EXIF value of the BYTE type. | |
#define | GAIA_EXIF_SHORT 2 |
EXIF value of the SHORT type. | |
#define | GAIA_EXIF_STRING 3 |
EXIF value of the STRING type. | |
#define | GAIA_EXIF_LONG 4 |
EXIF value of the LONG type. | |
#define | GAIA_EXIF_RATIONAL 5 |
EXIF value of the RATIONAL type. | |
#define | GAIA_EXIF_SLONG 9 |
EXIF value of the SLONG type. | |
#define | GAIA_EXIF_SRATIONAL 10 |
EXIF value of the SRATIONAL type. | |
Typedefs | |
typedef struct gaiaExifTagStruct | gaiaExifTag |
Container for an EXIF tag. | |
typedef gaiaExifTag * | gaiaExifTagPtr |
Typedef for EXIF tag structure. | |
typedef struct gaiaExifTagListStruct | gaiaExifTagList |
Container for a list of EXIF tags. | |
typedef gaiaExifTagList * | gaiaExifTagListPtr |
Typedef for EXIF tag structure. | |
Functions | |
GAIAEXIF_DECLARE gaiaExifTagListPtr | gaiaGetExifTags (const unsigned char *blob, int size) |
Creates a list of EXIF tags by parsing a BLOB of the JPEG-EXIF type. | |
GAIAEXIF_DECLARE void | gaiaExifTagsFree (gaiaExifTagListPtr tag_list) |
Destroy a list of EXIF tags. | |
GAIAEXIF_DECLARE int | gaiaGetExifTagsCount (gaiaExifTagListPtr tag_list) |
Return the total number of EXIF tags into the list. | |
GAIAEXIF_DECLARE gaiaExifTagPtr | gaiaGetExifTagByPos (gaiaExifTagListPtr tag_list, const int pos) |
Retrieves an EXIF tag by its relative position into the list. | |
GAIAEXIF_DECLARE gaiaExifTagPtr | gaiaGetExifTagById (const gaiaExifTagListPtr tag_list, const unsigned short tag_id) |
Retrieves an EXIF tag by its Tag ID. | |
GAIAEXIF_DECLARE gaiaExifTagPtr | gaiaGetExifGpsTagById (const gaiaExifTagListPtr tag_list, const unsigned short tag_id) |
Retrieves an EXIF-GPS tag by its Tag ID. | |
GAIAEXIF_DECLARE gaiaExifTagPtr | gaiaGetExifTagByName (const gaiaExifTagListPtr tag_list, const char *tag_name) |
Retrieves an EXIF tag by its name. | |
GAIAEXIF_DECLARE unsigned short | gaiaExifTagGetId (const gaiaExifTagPtr tag) |
Return the Tag ID from an EXIF tag. | |
GAIAEXIF_DECLARE void | gaiaExifTagGetName (const gaiaExifTagPtr tag, char *tag_name, int len) |
Return the Tag Name from an EXIF tag. | |
GAIAEXIF_DECLARE int | gaiaIsExifGpsTag (const gaiaExifTagPtr tag) |
Checks if an EXIF tag actually is an EXIF-GPS tag. | |
GAIAEXIF_DECLARE unsigned short | gaiaExifTagGetValueType (const gaiaExifTagPtr tag) |
Return the value type for an EXIF tag. | |
GAIAEXIF_DECLARE unsigned short | gaiaExifTagGetNumValues (const gaiaExifTagPtr tag) |
Return the total count of values from an EXIF tag. | |
GAIAEXIF_DECLARE unsigned char | gaiaExifTagGetByteValue (const gaiaExifTagPtr tag, const int ind, int *ok) |
Return a BYTE value from an EXIF tag. | |
GAIAEXIF_DECLARE void | gaiaExifTagGetStringValue (const gaiaExifTagPtr tag, char *str, int len, int *ok) |
Return a STRING value from an EXIF tag. | |
GAIAEXIF_DECLARE unsigned short | gaiaExifTagGetShortValue (const gaiaExifTagPtr tag, const int ind, int *ok) |
Return a SHORT value from an EXIF tag. | |
GAIAEXIF_DECLARE unsigned int | gaiaExifTagGetLongValue (const gaiaExifTagPtr tag, const int ind, int *ok) |
Return a LONG value from an EXIF tag. | |
GAIAEXIF_DECLARE unsigned int | gaiaExifTagGetRational1Value (const gaiaExifTagPtr tag, const int ind, int *ok) |
Return a RATIONAL [numerator] value from an EXIF tag. | |
GAIAEXIF_DECLARE unsigned int | gaiaExifTagGetRational2Value (const gaiaExifTagPtr tag, const int ind, int *ok) |
Return a RATIONAL [denominator] value from an EXIF tag. | |
GAIAEXIF_DECLARE double | gaiaExifTagGetRationalValue (const gaiaExifTagPtr tag, const int ind, int *ok) |
Return a RATIONAL value from an EXIF tag. | |
GAIAEXIF_DECLARE short | gaiaExifTagGetSignedShortValue (const gaiaExifTagPtr tag, const int ind, int *ok) |
Return a Signed SHORT value from an EXIF tag. | |
GAIAEXIF_DECLARE int | gaiaExifTagGetSignedLongValue (const gaiaExifTagPtr tag, const int ind, int *ok) |
Return a Signed LONG value from an EXIF tag. | |
GAIAEXIF_DECLARE int | gaiaExifTagGetSignedRational1Value (const gaiaExifTagPtr tag, const int ind, int *ok) |
Return a SRATIONAL [numerator] value from an EXIF tag. | |
GAIAEXIF_DECLARE int | gaiaExifTagGetSignedRational2Value (const gaiaExifTagPtr tag, const int ind, int *ok) |
Return a SRATIONAL [denominator] value from an EXIF tag. | |
GAIAEXIF_DECLARE double | gaiaExifTagGetSignedRationalValue (const gaiaExifTagPtr tag, const int ind, int *ok) |
Return a Signed RATIONAL value from an EXIF tag. | |
GAIAEXIF_DECLARE float | gaiaExifTagGetFloatValue (const gaiaExifTagPtr tag, const int ind, int *ok) |
Return a FLOAT value from an EXIF tag. | |
GAIAEXIF_DECLARE double | gaiaExifTagGetDoubleValue (const gaiaExifTagPtr tag, const int ind, int *ok) |
Return a DOUBLE value from an EXIF tag. | |
GAIAEXIF_DECLARE void | gaiaExifTagGetHumanReadable (const gaiaExifTagPtr tag, char *str, int len, int *ok) |
Return a human readable description from an EXIF tag. | |
GAIAEXIF_DECLARE int | gaiaGuessBlobType (const unsigned char *blob, int size) |
Attempts to guess the actual content-type of some BLOB. | |
GAIAEXIF_DECLARE int | gaiaGetGpsCoords (const unsigned char *blob, int size, double *longitude, double *latitude) |
Return longitude and latitude from an EXIF-GPS tag. | |
GAIAEXIF_DECLARE int | gaiaGetGpsLatLong (const unsigned char *blob, int size, char *latlong, int ll_size) |
Return a text string representing DMS coordinates from an EXIF-GPS tag. |
EXIF/image: supporting functions and constants.
typedef gaiaExifTagList* gaiaExifTagListPtr |
Typedef for EXIF tag structure.
typedef gaiaExifTag* gaiaExifTagPtr |
Typedef for EXIF tag structure.
GAIAEXIF_DECLARE unsigned char gaiaExifTagGetByteValue | ( | const gaiaExifTagPtr | tag, |
const int | ind, | ||
int * | ok | ||
) |
Return a BYTE value from an EXIF tag.
tag | pointer to an EXIF tag. |
ind | value index [first value has index 0]. |
ok | on completion will contain 0 on failure: any other value on success. |
GAIAEXIF_DECLARE double gaiaExifTagGetDoubleValue | ( | const gaiaExifTagPtr | tag, |
const int | ind, | ||
int * | ok | ||
) |
Return a DOUBLE value from an EXIF tag.
tag | pointer to an EXIF tag. |
ind | value index [first value has index 0]. |
ok | on completion will contain 0 on failure: any other value on success. |
GAIAEXIF_DECLARE float gaiaExifTagGetFloatValue | ( | const gaiaExifTagPtr | tag, |
const int | ind, | ||
int * | ok | ||
) |
Return a FLOAT value from an EXIF tag.
tag | pointer to an EXIF tag. |
ind | value index [first value has index 0]. |
ok | on completion will contain 0 on failure: any other value on success. |
GAIAEXIF_DECLARE void gaiaExifTagGetHumanReadable | ( | const gaiaExifTagPtr | tag, |
char * | str, | ||
int | len, | ||
int * | ok | ||
) |
Return a human readable description from an EXIF tag.
tag | pointer to an EXIF tag. |
str | receiving buffer: the STRING value will be copied here. |
len | length of the receiving buffer |
ok | on completion will contain 0 on failure: any other value on success. |
GAIAEXIF_DECLARE unsigned short gaiaExifTagGetId | ( | const gaiaExifTagPtr | tag | ) |
Return the Tag ID from an EXIF tag.
tag | pointer to an EXIF tag |
GAIAEXIF_DECLARE unsigned int gaiaExifTagGetLongValue | ( | const gaiaExifTagPtr | tag, |
const int | ind, | ||
int * | ok | ||
) |
Return a LONG value from an EXIF tag.
tag | pointer to an EXIF tag. |
ind | value index [first value has index 0]. |
ok | on completion will contain 0 on failure: any other value on success. |
GAIAEXIF_DECLARE void gaiaExifTagGetName | ( | const gaiaExifTagPtr | tag, |
char * | tag_name, | ||
int | len | ||
) |
Return the Tag Name from an EXIF tag.
tag | pointer to an EXIF tag |
tag_name | receiving buffer: the Tag Name will be copied here |
len | length of the receiving buffer |
GAIAEXIF_DECLARE unsigned short gaiaExifTagGetNumValues | ( | const gaiaExifTagPtr | tag | ) |
Return the total count of values from an EXIF tag.
tag | pointer to an EXIF tag |
GAIAEXIF_DECLARE unsigned int gaiaExifTagGetRational1Value | ( | const gaiaExifTagPtr | tag, |
const int | ind, | ||
int * | ok | ||
) |
Return a RATIONAL [numerator] value from an EXIF tag.
tag | pointer to an EXIF tag. |
ind | value index [first value has index 0]. |
ok | on completion will contain 0 on failure: any other value on success. |
GAIAEXIF_DECLARE unsigned int gaiaExifTagGetRational2Value | ( | const gaiaExifTagPtr | tag, |
const int | ind, | ||
int * | ok | ||
) |
Return a RATIONAL [denominator] value from an EXIF tag.
tag | pointer to an EXIF tag. |
ind | value index [first value has index 0]. |
ok | on completion will contain 0 on failure: any other value on success. |
GAIAEXIF_DECLARE double gaiaExifTagGetRationalValue | ( | const gaiaExifTagPtr | tag, |
const int | ind, | ||
int * | ok | ||
) |
Return a RATIONAL value from an EXIF tag.
tag | pointer to an EXIF tag. |
ind | value index [first value has index 0]. |
ok | on completion will contain 0 on failure: any other value on success. |
GAIAEXIF_DECLARE unsigned short gaiaExifTagGetShortValue | ( | const gaiaExifTagPtr | tag, |
const int | ind, | ||
int * | ok | ||
) |
Return a SHORT value from an EXIF tag.
tag | pointer to an EXIF tag. |
ind | value index [first value has index 0]. |
ok | on completion will contain 0 on failure: any other value on success. |
GAIAEXIF_DECLARE int gaiaExifTagGetSignedLongValue | ( | const gaiaExifTagPtr | tag, |
const int | ind, | ||
int * | ok | ||
) |
Return a Signed LONG value from an EXIF tag.
tag | pointer to an EXIF tag. |
ind | value index [first value has index 0]. |
ok | on completion will contain 0 on failure: any other value on success. |
GAIAEXIF_DECLARE int gaiaExifTagGetSignedRational1Value | ( | const gaiaExifTagPtr | tag, |
const int | ind, | ||
int * | ok | ||
) |
Return a SRATIONAL [numerator] value from an EXIF tag.
tag | pointer to an EXIF tag. |
ind | value index [first value has index 0]. |
ok | on completion will contain 0 on failure: any other value on success. |
GAIAEXIF_DECLARE int gaiaExifTagGetSignedRational2Value | ( | const gaiaExifTagPtr | tag, |
const int | ind, | ||
int * | ok | ||
) |
Return a SRATIONAL [denominator] value from an EXIF tag.
tag | pointer to an EXIF tag. |
ind | value index [first value has index 0]. |
ok | on completion will contain 0 on failure: any other value on success. |
GAIAEXIF_DECLARE double gaiaExifTagGetSignedRationalValue | ( | const gaiaExifTagPtr | tag, |
const int | ind, | ||
int * | ok | ||
) |
Return a Signed RATIONAL value from an EXIF tag.
tag | pointer to an EXIF tag. |
ind | value index [first value has index 0]. |
ok | on completion will contain 0 on failure: any other value on success. |
GAIAEXIF_DECLARE short gaiaExifTagGetSignedShortValue | ( | const gaiaExifTagPtr | tag, |
const int | ind, | ||
int * | ok | ||
) |
Return a Signed SHORT value from an EXIF tag.
tag | pointer to an EXIF tag. |
ind | value index [first value has index 0]. |
ok | on completion will contain 0 on failure: any other value on success. |
GAIAEXIF_DECLARE void gaiaExifTagGetStringValue | ( | const gaiaExifTagPtr | tag, |
char * | str, | ||
int | len, | ||
int * | ok | ||
) |
Return a STRING value from an EXIF tag.
tag | pointer to an EXIF tag. |
str | receiving buffer: the STRING value will be copied here. |
len | length of the receiving buffer |
ok | on completion will contain 0 on failure: any other value on success. |
GAIAEXIF_DECLARE unsigned short gaiaExifTagGetValueType | ( | const gaiaExifTagPtr | tag | ) |
Return the value type for an EXIF tag.
tag | pointer to an EXIF tag |
GAIAEXIF_DECLARE void gaiaExifTagsFree | ( | gaiaExifTagListPtr | tag_list | ) |
Destroy a list of EXIF tags.
tag_list | the list to be destroied |
GAIAEXIF_DECLARE gaiaExifTagPtr gaiaGetExifGpsTagById | ( | const gaiaExifTagListPtr | tag_list, |
const unsigned short | tag_id | ||
) |
Retrieves an EXIF-GPS tag by its Tag ID.
tag_list | pointer to an EXIF tag list. |
tag_id | the GPS Tag ID to be found |
GAIAEXIF_DECLARE gaiaExifTagPtr gaiaGetExifTagById | ( | const gaiaExifTagListPtr | tag_list, |
const unsigned short | tag_id | ||
) |
Retrieves an EXIF tag by its Tag ID.
tag_list | pointer to an EXIF tag list. |
tag_id | the Tag ID to be found |
GAIAEXIF_DECLARE gaiaExifTagPtr gaiaGetExifTagByName | ( | const gaiaExifTagListPtr | tag_list, |
const char * | tag_name | ||
) |
Retrieves an EXIF tag by its name.
tag_list | pointer to an EXIF tag list. |
tag_name | the Tag Name to be found |
GAIAEXIF_DECLARE gaiaExifTagPtr gaiaGetExifTagByPos | ( | gaiaExifTagListPtr | tag_list, |
const int | pos | ||
) |
Retrieves an EXIF tag by its relative position into the list.
tag_list | pointer to an EXIF tag list. |
pos | relative item position [first item is 0] |
GAIAEXIF_DECLARE gaiaExifTagListPtr gaiaGetExifTags | ( | const unsigned char * | blob, |
int | size | ||
) |
Creates a list of EXIF tags by parsing a BLOB of the JPEG-EXIF type.
blob | the BLOB to be parsed |
size | the BLOB size (in bytes) |
GAIAEXIF_DECLARE int gaiaGetExifTagsCount | ( | gaiaExifTagListPtr | tag_list | ) |
Return the total number of EXIF tags into the list.
tag_list | pointer to an EXIF tag list. |
GAIAEXIF_DECLARE int gaiaGetGpsCoords | ( | const unsigned char * | blob, |
int | size, | ||
double * | longitude, | ||
double * | latitude | ||
) |
Return longitude and latitude from an EXIF-GPS tag.
blob | the BLOB to be parsed |
size | length of the BLOB (in bytes) |
longitude | on success will contain the longitude coordinate |
latitude | on success will contain the latitude coordinate |
GAIAEXIF_DECLARE int gaiaGetGpsLatLong | ( | const unsigned char * | blob, |
int | size, | ||
char * | latlong, | ||
int | ll_size | ||
) |
Return a text string representing DMS coordinates from an EXIF-GPS tag.
blob | the BLOB to be parsed |
size | length of the BLOB (in bytes) |
latlong | receiving buffer: the text string will be copied here. |
ll_size | length of the receiving buffer |
GAIAEXIF_DECLARE int gaiaGuessBlobType | ( | const unsigned char * | blob, |
int | size | ||
) |
Attempts to guess the actual content-type of some BLOB.
blob | the BLOB to be parsed |
size | length of the BLOB (in bytes) |
GAIAEXIF_DECLARE int gaiaIsExifGpsTag | ( | const gaiaExifTagPtr | tag | ) |
Checks if an EXIF tag actually is an EXIF-GPS tag.
tag | pointer to an EXIF tag |