00001
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef __EXIF_UTILS_H__
00024 #define __EXIF_UTILS_H__
00025
00026 #ifdef __cplusplus
00027 extern "C" {
00028 #endif
00029
00030 #include <libexif/exif-byte-order.h>
00031 #include <libexif/exif-format.h>
00032 #include <libexif/_stdint.h>
00033
00034
00035
00036
00037
00039 typedef unsigned char ExifByte;
00040
00042 typedef signed char ExifSByte;
00043
00045 typedef char * ExifAscii;
00046
00048 typedef uint16_t ExifShort;
00049
00051 typedef int16_t ExifSShort;
00052
00054 typedef uint32_t ExifLong;
00055
00057 typedef int32_t ExifSLong;
00058
00060 typedef struct {ExifLong numerator; ExifLong denominator;} ExifRational;
00061
00062 typedef char ExifUndefined;
00063
00065 typedef struct {ExifSLong numerator; ExifSLong denominator;} ExifSRational;
00066
00067
00074 ExifShort exif_get_short (const unsigned char *b, ExifByteOrder order);
00075
00082 ExifSShort exif_get_sshort (const unsigned char *b, ExifByteOrder order);
00083
00090 ExifLong exif_get_long (const unsigned char *b, ExifByteOrder order);
00091
00098 ExifSLong exif_get_slong (const unsigned char *b, ExifByteOrder order);
00099
00106 ExifRational exif_get_rational (const unsigned char *b, ExifByteOrder order);
00107
00114 ExifSRational exif_get_srational (const unsigned char *b, ExifByteOrder order);
00115
00122 void exif_set_short (unsigned char *b, ExifByteOrder order,
00123 ExifShort value);
00124
00131 void exif_set_sshort (unsigned char *b, ExifByteOrder order,
00132 ExifSShort value);
00133
00140 void exif_set_long (unsigned char *b, ExifByteOrder order,
00141 ExifLong value);
00142
00149 void exif_set_slong (unsigned char *b, ExifByteOrder order,
00150 ExifSLong value);
00151
00158 void exif_set_rational (unsigned char *b, ExifByteOrder order,
00159 ExifRational value);
00160
00167 void exif_set_srational (unsigned char *b, ExifByteOrder order,
00168 ExifSRational value);
00169
00171 void exif_convert_utf16_to_utf8 (char *out, const unsigned short *in, int maxlen);
00172
00173
00174
00176 void exif_array_set_byte_order (ExifFormat, unsigned char *, unsigned int,
00177 ExifByteOrder o_orig, ExifByteOrder o_new);
00178
00179 #undef MIN
00180 #define MIN(a, b) (((a) < (b)) ? (a) : (b))
00181
00182 #undef MAX
00183 #define MAX(a, b) (((a) > (b)) ? (a) : (b))
00184
00185
00186
00188 #define EXIF_TAG_SUBSEC_TIME EXIF_TAG_SUB_SEC_TIME
00189
00190 #ifdef __cplusplus
00191 }
00192 #endif
00193
00194 #endif