38 if (!b || !n || !fs)
return;
42 for (j = 0; j < n; j++) {
48 for (j = 0; j < n; j++) {
54 for (j = 0; j < n; j++) {
60 for (j = 0; j < n; j++) {
66 for (j = 0; j < n; j++) {
72 for (j = 0; j < n; j++) {
92 return (((
unsigned int)buf[0] << 8) | buf[1]);
94 return (((
unsigned int)buf[1] << 8) | buf[0]);
113 b[0] = (
unsigned char) (value >> 8);
114 b[1] = (
unsigned char) value;
117 b[0] = (
unsigned char) value;
118 b[1] = (
unsigned char) (value >> 8);
135 return (((uint32_t)b[0] << 24) | ((uint32_t)b[1] << 16) | ((uint32_t)b[2] << 8) | (uint32_t)b[3]);
137 return (((uint32_t)b[3] << 24) | ((uint32_t)b[2] << 16) | ((uint32_t)b[1] << 8) | (uint32_t)b[0]);
150 b[0] = (
unsigned char) (value >> 24);
151 b[1] = (
unsigned char) (value >> 16);
152 b[2] = (
unsigned char) (value >> 8);
153 b[3] = (
unsigned char) value;
156 b[3] = (
unsigned char) (value >> 24);
157 b[2] = (
unsigned char) (value >> 16);
158 b[1] = (
unsigned char) (value >> 8);
159 b[0] = (
unsigned char) value;
236 }
else if (v < 0x800) {
238 *out++ = ((v >> 6) & 0x1F) | 0xC0;
239 *out++ = (v & 0x3F) | 0x80;
246 *out++ = ((v >> 12) & 0x0F) | 0xE0;
247 *out++ = ((v >> 6) & 0x3F) | 0x80;
248 *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.
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.
void exif_convert_utf16_to_utf8(char *out, const unsigned char *in, int maxlen)
This function converts rather UCS-2LE than UTF-16 to UTF-8.
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.