exif-utils.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __EXIF_UTILS_H__
00022 #define __EXIF_UTILS_H__
00023
00024 #ifdef __cplusplus
00025 extern "C" {
00026 #endif
00027
00028 #include <libexif/exif-byte-order.h>
00029 #include <libexif/exif-format.h>
00030 #include <libexif/_stdint.h>
00031
00032
00033
00034
00035
00036 typedef unsigned char ExifByte;
00037 typedef signed char ExifSByte;
00038 typedef char * ExifAscii;
00039 typedef uint16_t ExifShort;
00040 typedef int16_t ExifSShort;
00041 typedef uint32_t ExifLong;
00042
00044 typedef struct {ExifLong numerator; ExifLong denominator;} ExifRational;
00045
00046 typedef char ExifUndefined;
00047 typedef int32_t ExifSLong;
00048
00050 typedef struct {ExifSLong numerator; ExifSLong denominator;} ExifSRational;
00051
00052
00053 ExifShort exif_get_short (const unsigned char *b, ExifByteOrder order);
00054 ExifSShort exif_get_sshort (const unsigned char *b, ExifByteOrder order);
00055 ExifLong exif_get_long (const unsigned char *b, ExifByteOrder order);
00056 ExifSLong exif_get_slong (const unsigned char *b, ExifByteOrder order);
00057 ExifRational exif_get_rational (const unsigned char *b, ExifByteOrder order);
00058 ExifSRational exif_get_srational (const unsigned char *b, ExifByteOrder order);
00059
00060 void exif_set_short (unsigned char *b, ExifByteOrder order,
00061 ExifShort value);
00062 void exif_set_sshort (unsigned char *b, ExifByteOrder order,
00063 ExifSShort value);
00064 void exif_set_long (unsigned char *b, ExifByteOrder order,
00065 ExifLong value);
00066 void exif_set_slong (unsigned char *b, ExifByteOrder order,
00067 ExifSLong value);
00068 void exif_set_rational (unsigned char *b, ExifByteOrder order,
00069 ExifRational value);
00070 void exif_set_srational (unsigned char *b, ExifByteOrder order,
00071 ExifSRational value);
00072
00073 void exif_convert_utf16_to_utf8 (char *out, const unsigned short *in, int maxlen);
00074
00075
00076 void exif_array_set_byte_order (ExifFormat, unsigned char *, unsigned int,
00077 ExifByteOrder o_orig, ExifByteOrder o_new);
00078
00079 #undef MIN
00080 #define MIN(a, b) (((a) < (b)) ? (a) : (b))
00081
00082 #undef MAX
00083 #define MAX(a, b) (((a) > (b)) ? (a) : (b))
00084
00085
00086 #define EXIF_TAG_SUBSEC_TIME EXIF_TAG_SUB_SEC_TIME
00087
00088 #ifdef __cplusplus
00089 }
00090 #endif
00091
00092 #endif