libopenraw  0.3.7
consts.h
1 /*
2  * libopenraw - consts.h
3  *
4  * Copyright (c) 2008 Novell, Inc.
5  * Copyright (C) 2005-2020 Hubert Figuière
6  *
7  * This library is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public License
9  * as published by the Free Software Foundation, either version 3 of
10  * the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library. If not, see
19  * <http://www.gnu.org/licenses/>.
20  */
26 #ifndef LIBOPENRAW_CONSTS_H_
27 #define LIBOPENRAW_CONSTS_H_
28 
29 #include <stdint.h>
30 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
42 typedef enum {
55  OR_ERROR_LAST_
56 } or_error;
57 
59 typedef enum {
78 
80 typedef enum {
81  OR_DATA_TYPE_NONE = 0,
90  OR_DATA_TYPE_UNKNOWN
91 } or_data_type;
92 
94 typedef enum {
97  OR_CFA_PATTERN_RGGB = 2,
98  OR_CFA_PATTERN_GBRG = 3,
99  OR_CFA_PATTERN_BGGR = 4,
100  OR_CFA_PATTERN_GRBG = 5,
101  _OR_CFA_PATTERN_INVALID
103 
105 typedef enum {
108  OR_PATTERN_COLOUR_BLUE = 2
110 
112 typedef enum {
113  OR_OPTIONS_NONE = 0x00000000,
114  OR_OPTIONS_DONT_DECOMPRESS = 0x00000001
117 
121 typedef enum {
126 
130 typedef uint32_t or_rawfile_typeid;
131 
133 #define OR_MAKE_FILE_TYPEID(vendor, camera) ((vendor << 16) | (camera & 0xffff))
135 #define OR_GET_FILE_TYPEID_VENDOR(ftypeid) ((ftypeid & 0xffff0000) >> 16)
137 #define OR_GET_FILE_TYPEID_CAMERA(ftypeid) (ftypeid & 0xffff)
138 
140 typedef enum {
154  OR_IFD_INVALID = 10000,
156 
157 
158 #ifdef __cplusplus
159 }
160 #endif
161 
164 #endif
or_cfa_pattern
CFA pattern types.
Definition: consts.h:94
uint32_t or_rawfile_typeid
This is the type ID, a combination of vendor model It maps a specific camera. Only for the NATIVE fil...
Definition: consts.h:130
or_data_type
Data types.
Definition: consts.h:80
or_options
Options.
Definition: consts.h:112
or_ifd_dir_type
Type of IfdDir.
Definition: consts.h:140
or_cfa_pattern_colour
CFA colour components.
Definition: consts.h:105
or_rawfile_type
Types of RAW files.
Definition: consts.h:59
or_colour_matrix_origin
Where the colour matrix comes from. Typically DNG is provided. The others are built-in.
Definition: consts.h:121
or_error
Error codes returned by libopenraw.
Definition: consts.h:42
@ OR_CFA_PATTERN_NON_RGB22
Definition: consts.h:96
@ OR_CFA_PATTERN_NONE
Definition: consts.h:95
@ OR_DATA_TYPE_TIFF
Definition: consts.h:85
@ OR_DATA_TYPE_PNG
Definition: consts.h:86
@ OR_DATA_TYPE_PIXMAP_16RGB
Definition: consts.h:83
@ OR_DATA_TYPE_JPEG
Definition: consts.h:84
@ OR_DATA_TYPE_COMPRESSED_RAW
Definition: consts.h:88
@ OR_DATA_TYPE_RAW
Definition: consts.h:87
@ OR_DATA_TYPE_PIXMAP_8RGB
Definition: consts.h:82
@ OR_OPTIONS_DONT_DECOMPRESS
Definition: consts.h:114
@ OR_OPTIONS_NONE
Definition: consts.h:113
@ OR_IFD_OTHER
Generic.
Definition: consts.h:142
@ OR_IFD_RAW
RAW data.
Definition: consts.h:150
@ OR_IFD_MNOTE
MakerNote.
Definition: consts.h:148
@ OR_IFD_MAIN
Main (like in TIFF)
Definition: consts.h:144
@ OR_IFD_EXIF
Exif metadata.
Definition: consts.h:146
@ OR_IFD_INVALID
INVALID value.
Definition: consts.h:154
@ OR_IFD_SUBIFD
SubIFD.
Definition: consts.h:152
@ OR_PATTERN_COLOUR_RED
Definition: consts.h:106
@ OR_PATTERN_COLOUR_GREEN
Definition: consts.h:107
@ OR_RAWFILE_TYPE_MRW
Definition: consts.h:64
@ OR_RAWFILE_TYPE_DNG
Definition: consts.h:66
@ OR_RAWFILE_TYPE_GPR
Definition: consts.h:75
@ OR_RAWFILE_TYPE_TIFF
Definition: consts.h:70
@ OR_RAWFILE_TYPE_NRW
Definition: consts.h:71
@ OR_RAWFILE_TYPE_RAF
Definition: consts.h:73
@ OR_RAWFILE_TYPE_CRW
Definition: consts.h:62
@ OR_RAWFILE_TYPE_ERF
Definition: consts.h:69
@ OR_RAWFILE_TYPE_NEF
Definition: consts.h:63
@ OR_RAWFILE_TYPE_SR2
Definition: consts.h:76
@ OR_RAWFILE_TYPE_CR3
Definition: consts.h:74
@ OR_RAWFILE_TYPE_ARW
Definition: consts.h:65
@ OR_RAWFILE_TYPE_RW2
Definition: consts.h:72
@ OR_RAWFILE_TYPE_PEF
Definition: consts.h:68
@ OR_RAWFILE_TYPE_UNKNOWN
Definition: consts.h:60
@ OR_RAWFILE_TYPE_ORF
Definition: consts.h:67
@ OR_RAWFILE_TYPE_CR2
Definition: consts.h:61
@ OR_COLOUR_MATRIX_BUILTIN
Definition: consts.h:123
@ OR_COLOUR_MATRIX_UNKNOWN
Definition: consts.h:122
@ OR_COLOUR_MATRIX_PROVIDED
Definition: consts.h:124
@ OR_ERROR_ALREADY_OPEN
Definition: consts.h:53
@ OR_ERROR_CANT_OPEN
Definition: consts.h:46
@ OR_ERROR_BUF_TOO_SMALL
Definition: consts.h:44
@ OR_ERROR_NOT_IMPLEMENTED
Definition: consts.h:52
@ OR_ERROR_CLOSED_STREAM
Definition: consts.h:47
@ OR_ERROR_INVALID_PARAM
Definition: consts.h:49
@ OR_ERROR_NONE
Definition: consts.h:43
@ OR_ERROR_NOTAREF
Definition: consts.h:45
@ OR_ERROR_INVALID_FORMAT
Definition: consts.h:50
@ OR_ERROR_NOT_FOUND
Definition: consts.h:48
@ OR_ERROR_DECOMPRESSION
Definition: consts.h:51
@ OR_ERROR_UNKNOWN
Definition: consts.h:54