40 if (!b || !n || !fs)
return;
44 for (j = 0; j < n; j++) {
50 for (j = 0; j < n; j++) {
56 for (j = 0; j < n; j++) {
62 for (j = 0; j < n; j++) {
68 for (j = 0; j < n; j++) {
74 for (j = 0; j < n; j++) {
94 return (((
unsigned int)buf[0] << 8) | buf[1]);
96 return (((
unsigned int)buf[1] << 8) | buf[0]);
115 b[0] = (
unsigned char) (value >> 8);
116 b[1] = (
unsigned char) value;
119 b[0] = (
unsigned char) value;
120 b[1] = (
unsigned char) (value >> 8);
137 return (((uint32_t)b[0] << 24) | ((uint32_t)b[1] << 16) | ((uint32_t)b[2] << 8) | (uint32_t)b[3]);
139 return (((uint32_t)b[3] << 24) | ((uint32_t)b[2] << 16) | ((uint32_t)b[1] << 8) | (uint32_t)b[0]);
152 b[0] = (
unsigned char) (value >> 24);
153 b[1] = (
unsigned char) (value >> 16);
154 b[2] = (
unsigned char) (value >> 8);
155 b[3] = (
unsigned char) value;
158 b[3] = (
unsigned char) (value >> 24);
159 b[2] = (
unsigned char) (value >> 16);
160 b[1] = (
unsigned char) (value >> 8);
161 b[0] = (
unsigned char) value;
241 }
else if (v < 0x800) {
243 *out++ = ((v >> 6) & 0x1F) | 0xC0;
244 *out++ = (v & 0x3F) | 0x80;
251 *out++ = ((v >> 12) & 0x0F) | 0xE0;
252 *out++ = ((v >> 6) & 0x3F) | 0x80;
253 *out++ = (v & 0x3F) | 0x80;
ExifByteOrder
Which byte order to use.
@ EXIF_BYTE_ORDER_INTEL
Little-endian byte order.
@ EXIF_BYTE_ORDER_MOTOROLA
Big-endian byte order.
void exif_convert_utf16_to_utf8(char *out, unsigned int outlen, const unsigned char *in, unsigned int inlen)
This function converts rather UCS-2LE than UTF-16 to UTF-8.
ExifRational exif_get_rational(const unsigned char *buf, ExifByteOrder order)
Retrieve an ExifRational value from memory.
void exif_set_rational(unsigned char *buf, ExifByteOrder order, ExifRational value)
Store an ExifRational value into memory in EXIF format.
ExifLong exif_get_long(const unsigned char *buf, ExifByteOrder order)
Retrieve an ExifLong value from memory.
ExifShort exif_get_short(const unsigned char *buf, ExifByteOrder order)
Retrieve an ExifShort value from memory.
void exif_array_set_byte_order(ExifFormat f, unsigned char *b, unsigned int n, ExifByteOrder o_orig, ExifByteOrder o_new)
ExifSLong exif_get_slong(const unsigned char *b, ExifByteOrder order)
Retrieve an ExifSLong value from memory.
void exif_set_sshort(unsigned char *b, ExifByteOrder order, ExifSShort value)
Store an ExifSShort value into memory in EXIF format.
ExifSShort exif_get_sshort(const unsigned char *buf, ExifByteOrder order)
Retrieve an ExifSShort value from memory.
void exif_set_long(unsigned char *b, ExifByteOrder order, ExifLong value)
Store an ExifLong value into memory in EXIF format.
void exif_set_srational(unsigned char *buf, ExifByteOrder order, ExifSRational value)
Store an ExifSRational value into memory in EXIF format.
void exif_set_short(unsigned char *b, ExifByteOrder order, ExifShort value)
Store an ExifShort value into memory in EXIF format.
ExifSRational exif_get_srational(const unsigned char *buf, ExifByteOrder order)
Retrieve an ExifSRational value from memory.
void exif_set_slong(unsigned char *b, ExifByteOrder order, ExifSLong value)
Store an ExifSLong value into memory in EXIF format.
EXIF data manipulation functions and types.
uint32_t ExifLong
EXIF Unsigned Long data type.
int32_t ExifSLong
EXIF Signed Long data type.
uint16_t ExifShort
EXIF Unsigned Short data type.
int16_t ExifSShort
EXIF Signed Short data type.
EXIF Unsigned Rational data type.
EXIF Signed Rational data type.