libopenraw
rawdata.h
1 /* -*- mode: C++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: t -*- */
2 /*
3  * libopenraw - rawdata.h
4  *
5  * Copyright (C) 2007-2016 Hubert Figuiere
6  * Copyright (C) 2008 Novell, Inc.
7  *
8  * This library is free software: you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public License
10  * as published by the Free Software Foundation, either version 3 of
11  * the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library. If not, see
20  * <http://www.gnu.org/licenses/>.
21  */
22 
23 
24 #ifndef LIBOPENRAW_RAWDATA_H_
25 #define LIBOPENRAW_RAWDATA_H_
26 
27 #include <stddef.h>
28 #include <stdint.h>
29 
30 #include <libopenraw/consts.h>
31 #include <libopenraw/types.h>
32 #include <libopenraw/cfapattern.h>
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
43  or_error or_get_extract_rawdata(const char* filename, uint32_t options,
44  ORRawDataRef *rawdata);
45 
46  ORRawDataRef
47  or_rawdata_new(void);
48 
49  or_error
50  or_rawdata_release(ORRawDataRef rawdata);
51 
52  or_data_type
53  or_rawdata_format(ORRawDataRef rawdata);
54 
55  void *
56  or_rawdata_data(ORRawDataRef rawdata);
57 
58  size_t
59  or_rawdata_data_size(ORRawDataRef rawdata);
60 
61  void
62  or_rawdata_dimensions(ORRawDataRef rawdata,
63  uint32_t *x, uint32_t *y);
64 
65  void
66  or_rawdata_get_roi(ORRawDataRef rawdata,
67  uint32_t *x, uint32_t *y,
68  uint32_t *width, uint32_t *height);
69 
70  uint32_t
71  or_rawdata_bpc(ORRawDataRef rawdata);
72 
76  or_cfa_pattern
77  or_rawdata_get_cfa_pattern_type(ORRawDataRef rawdata);
78 
79  ORCfaPatternRef
80  or_rawdata_get_cfa_pattern(ORRawDataRef rawdata);
81 
85  uint32_t
86  or_rawdata_get_compression(ORRawDataRef rawdata);
87 
95  or_error
96  or_rawdata_get_levels(ORRawDataRef rawdata, uint16_t *black,
97  uint16_t *white);
98 
105  const double*
106  or_rawdata_get_colour_matrix(ORRawDataRef rawdata, uint32_t index,
107  uint32_t *size);
108 
114  or_error
115  or_rawdata_get_rendered_image(ORRawDataRef rawdata,
116  ORBitmapDataRef bitmapdata,
117  uint32_t options);
118 
119 #ifdef __cplusplus
120 }
121 #endif
122 
123 #endif