libopenraw
rawfile.h
1 /*
2  * libopenraw - rawfile.h
3  *
4  * Copyright (C) 2007-2016 Hubert Figuiere
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 #ifndef LIBOPENRAW_RAWFILE_H_
23 #define LIBOPENRAW_RAWFILE_H_
24 
25 #include <libopenraw/types.h>
26 #include <libopenraw/consts.h>
27 #include <libopenraw/rawdata.h>
28 #include <libopenraw/thumbnails.h>
29 #include <libopenraw/metadata.h>
30 #include <libopenraw/bitmapdata.h>
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
40 const char **
41 or_get_file_extensions();
42 
43 ORRawFileRef
44 or_rawfile_new(const char* filename, or_rawfile_type type);
45 
46 ORRawFileRef
47 or_rawfile_new_from_memory(const uint8_t *buffer, uint32_t len, or_rawfile_type type);
48 
49 or_error
50 or_rawfile_release(ORRawFileRef rawfile);
51 
52 or_rawfile_type
53 or_rawfile_get_type(ORRawFileRef rawfile);
54 
56 or_rawfile_typeid
57 or_rawfile_get_typeid(ORRawFileRef rawfile);
58 
64 const uint32_t *
65 or_rawfile_get_thumbnail_sizes(ORRawFileRef rawfile,
66  size_t *size);
67 
68 or_error
69 or_rawfile_get_thumbnail(ORRawFileRef rawfile, uint32_t preferred_size,
70  ORThumbnailRef thumb);
71 
72 or_error
73 or_rawfile_get_rawdata(ORRawFileRef rawfile, ORRawDataRef rawdata,
74  uint32_t options);
75 
81 or_error
82 or_rawfile_get_rendered_image(ORRawFileRef rawfile, ORBitmapDataRef rawdata,
83  uint32_t options);
84 
85 
91 int32_t
92 or_rawfile_get_orientation(ORRawFileRef rawfile);
93 
101 or_error
102 or_rawfile_get_colourmatrix1(ORRawFileRef rawfile, double* matrix, uint32_t* size);
103 
104 or_error
105 or_rawfile_get_colourmatrix2(ORRawFileRef rawfile, double* matrix, uint32_t* size);
106 
110 ExifLightsourceValue or_rawfile_get_calibration_illuminant1(ORRawFileRef rawfile);
111 ExifLightsourceValue or_rawfile_get_calibration_illuminant2(ORRawFileRef rawfile);
112 
117 ORConstMetaValueRef
118 or_rawfile_get_metavalue(ORRawFileRef rawfile, int32_t meta_index);
119 
120 #if 0
121 
126 XmpPtr
127 or_rawfile_get_xmp(ORRawFileRef rawfile);
128 
129 #endif
130 
131 #ifdef __cplusplus
132 }
133 #endif
134 
135 #endif
136 /*
137  Local Variables:
138  mode:c++
139  c-file-style:"stroustrup"
140  c-file-offsets:((innamespace . 0))
141  indent-tabs-mode:nil
142  fill-column:80
143  End:
144 */