| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
#ifndef WEBP_IMAGEIO_METADATA_H_ |
| 14 |
#define WEBP_IMAGEIO_METADATA_H_ |
| 15 |
|
| 16 |
#include "webp/types.h" |
| 17 |
|
| 18 |
#ifdef __cplusplus |
| 19 |
extern "C" { |
| 20 |
#endif |
| 21 |
|
| 22 |
typedef struct MetadataPayload { |
| 23 |
uint8_t* bytes; |
| 24 |
size_t size; |
| 25 |
} MetadataPayload; |
| 26 |
|
| 27 |
typedef struct Metadata { |
| 28 |
MetadataPayload exif; |
| 29 |
MetadataPayload iccp; |
| 30 |
MetadataPayload xmp; |
| 31 |
} Metadata; |
| 32 |
|
| 33 |
#define METADATA_OFFSET(x) offsetof(Metadata, x) |
| 34 |
|
| 35 |
void MetadataInit(Metadata* const metadata); |
| 36 |
void MetadataPayloadDelete(MetadataPayload* const payload); |
| 37 |
void MetadataFree(Metadata* const metadata); |
| 38 |
|
| 39 |
|
| 40 |
int MetadataCopy(const char* metadata, size_t metadata_len, |
| 41 |
MetadataPayload* const payload); |
| 42 |
|
| 43 |
#ifdef __cplusplus |
| 44 |
} |
| 45 |
#endif |
| 46 |
|
| 47 |
#endif |