Toggle navigation
libopenraw
Main
Projects
libopenraw
Exempi
Raw Thumbnailer
File Formats
All
Canon CR2
Canon CR3
Canon CRW
Fujfilm
Nikon
Olympus
Panasonic
Pentax
Blog
Development
libopenraw
0.3.7
include
libopenraw
metadata.h
1
/*
2
* libopenraw - metadata.h
3
*
4
* Copyright (C) 2007-2020 Hubert Figuière
5
*
6
* This library is free software: you can redistribute it and/or
7
* modify it under the terms of the GNU Lesser General Public License
8
* as published by the Free Software Foundation, either version 3 of
9
* the License, or (at your option) any later version.
10
*
11
* This library is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* Lesser General Public License for more details.
15
*
16
* You should have received a copy of the GNU Lesser General Public
17
* License along with this library. If not, see
18
* <http://www.gnu.org/licenses/>.
19
*/
20
21
22
#pragma once
23
24
#include <stdint.h>
25
#include <stdbool.h>
26
27
#define INCLUDE_EXIF_
28
#include <libopenraw/exif.h>
29
#undef INCLUDE_EXIF_
30
31
#include <libopenraw/types.h>
32
#include <libopenraw/consts.h>
33
40
#ifdef __cplusplus
41
extern
"C"
{
42
#endif
43
44
typedef
struct
_MetadataIterator*
ORMetadataIteratorRef
;
46
typedef
struct
_MetaValue*
ORMetaValueRef
;
47
typedef
const
struct
_MetaValue*
ORConstMetaValueRef
;
50
enum
{
51
META_NS_EXIF
= (1 << 16),
52
META_NS_TIFF
= (2 << 16)
53
};
54
56
#define META_NS_MASKOUT(x) (x & 0xffff)
58
#define META_INDEX_MASKOUT(x) (x & (0xffff<<16))
59
66
const
char
*
or_metavalue_get_string
(
ORConstMetaValueRef
value, uint32_t idx);
67
74
const
char
*
or_metavalue_get_as_string
(
ORConstMetaValueRef
value,
bool
full);
75
80
uint32_t
or_metavalue_get_count
(
ORMetaValueRef
value);
81
83
void
or_metavalue_release
(
ORMetaValueRef
value);
84
89
int
or_metadata_iterator_next
(
ORMetadataIteratorRef
iterator);
90
100
int
101
or_metadata_iterator_get_entry
(
ORMetadataIteratorRef
iterator,
102
ORIfdDirRef
* ifd, uint16_t*
id
,
103
ExifTagType
* type,
ORMetaValueRef
* value);
104
108
void
or_metadata_iterator_free
(
ORMetadataIteratorRef
iterator);
109
110
#ifdef __cplusplus
111
}
112
#endif
113
ORConstMetaValueRef
const struct _MetaValue * ORConstMetaValueRef
A const metadata value.
Definition:
metadata.h:47
or_metadata_iterator_get_entry
int or_metadata_iterator_get_entry(ORMetadataIteratorRef iterator, ORIfdDirRef *ifd, uint16_t *id, ExifTagType *type, ORMetaValueRef *value)
Get the metadata entry from the iterator.
Definition:
metadata.cpp:88
or_metavalue_get_count
uint32_t or_metavalue_get_count(ORMetaValueRef value)
Get the value count.
Definition:
metadata.cpp:57
ORMetadataIteratorRef
struct _MetadataIterator * ORMetadataIteratorRef
A metadata iterator.
Definition:
metadata.h:44
or_metadata_iterator_free
void or_metadata_iterator_free(ORMetadataIteratorRef iterator)
Free the iterator.
Definition:
metadata.cpp:133
or_metavalue_release
void or_metavalue_release(ORMetaValueRef value)
Free the MetaValue.
Definition:
metadata.cpp:65
or_metavalue_get_string
const char * or_metavalue_get_string(ORConstMetaValueRef value, uint32_t idx)
Get the string out of the MetaValue.
Definition:
metadata.cpp:39
or_metavalue_get_as_string
const char * or_metavalue_get_as_string(ORConstMetaValueRef value, bool full)
Convert the MetaValue to a string.
Definition:
metadata.cpp:50
ORMetaValueRef
struct _MetaValue * ORMetaValueRef
A metadata value.
Definition:
metadata.h:46
or_metadata_iterator_next
int or_metadata_iterator_next(ORMetadataIteratorRef iterator)
Move to the next metadata value.
Definition:
metadata.cpp:76
META_NS_TIFF
@ META_NS_TIFF
Definition:
metadata.h:52
META_NS_EXIF
@ META_NS_EXIF
Definition:
metadata.h:51
ExifTagType
ExifTagType
Definition:
exif.h:271
ORIfdDirRef
struct _IfdDir * ORIfdDirRef
IfdDir reference.
Definition:
types.h:34