libopenraw
rawfile.h
1 /*
2  * libopenraw - rawfile.h
3  *
4  * Copyright (C) 2007-2008 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 
36 typedef struct _RawFile *ORRawFileRef;
37 
42 const char **
43 or_get_file_extensions();
44 
45 ORRawFileRef
46 or_rawfile_new(const char* filename, or_rawfile_type type);
47 
48 ORRawFileRef
49 or_rawfile_new_from_memory(const uint8_t *buffer, uint32_t len, or_rawfile_type type);
50 
51 or_error
52 or_rawfile_release(ORRawFileRef rawfile);
53 
54 or_rawfile_type
55 or_rawfile_get_type(ORRawFileRef rawfile);
56 
58 or_rawfile_typeid
59 or_rawfile_get_typeid(ORRawFileRef rawfile);
60 
61 or_error
62 or_rawfile_get_thumbnail(ORRawFileRef rawfile, uint32_t preferred_size,
63  ORThumbnailRef thumb);
64 
65 or_error
66 or_rawfile_get_rawdata(ORRawFileRef rawfile, ORRawDataRef rawdata,
67  uint32_t options);
68 
73 or_error
74 or_rawfile_get_rendered_image(ORRawFileRef rawfile, ORBitmapDataRef rawdata,
75  uint32_t options);
76 
77 
83 int32_t
84 or_rawfile_get_orientation(ORRawFileRef rawfile);
85 
86 #if 0
87 
91 ORConstMetaValueRef
92 or_rawfile_get_metavalue(ORRawFileRef rawfile, int32_t meta_index);
93 
99 XmpPtr
100 or_rawfile_get_xmp(ORRawFileRef rawfile);
101 
102 #endif
103 
104 #ifdef __cplusplus
105 }
106 #endif
107 
108 #endif
109 /*
110  Local Variables:
111  mode:c++
112  c-file-style:"stroustrup"
113  c-file-offsets:((innamespace . 0))
114  indent-tabs-mode:nil
115  fill-column:80
116  End:
117 */