libopenraw
cfapattern.hpp
1/*
2 * libopenraw - cfapattern.h
3 *
4 * Copyright (C) 2012 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#ifndef LIBOPENRAWPP_CFA_PATTERN_H_
22#define LIBOPENRAWPP_CFA_PATTERN_H_
23
24#include <stdint.h>
25#include <libopenraw/consts.h>
26
27namespace OpenRaw {
28
29class CfaPattern
30{
31public:
32 virtual ~CfaPattern();
33
35 void setSize(uint16_t x, uint16_t y);
36
38 bool is2by2Rgb() const;
39
44 ::or_cfa_pattern patternType() const;
45 const uint8_t* patternPattern(uint16_t& count) const;
46
50 static const CfaPattern* twoByTwoPattern(::or_cfa_pattern);
51
52protected:
53 CfaPattern();
54 CfaPattern(::or_cfa_pattern pattern, uint16_t width, uint16_t height);
55
61 void setPatternPattern(const uint8_t* pattern, uint16_t count);
62
63private:
64 // no copy allowed
65 CfaPattern(const CfaPattern &);
66 CfaPattern& operator=(const CfaPattern&);
67
68 void setPatternType(::or_cfa_pattern pattern);
69
70 class Private;
71
72 Private *d;
73};
74
75
76}
77
78#endif
79/*
80 Local Variables:
81 mode:c++
82 c-file-style:"stroustrup"
83 c-file-offsets:((innamespace . 0))
84 tab-width:2
85 c-basic-offset:2
86 indent-tabs-mode:nil
87 fill-column:80
88 End:
89*/
void setPatternPattern(const uint8_t *pattern, uint16_t count)
bool is2by2Rgb() const
static const CfaPattern * twoByTwoPattern(::or_cfa_pattern)
::or_cfa_pattern patternType() const
void setSize(uint16_t x, uint16_t y)
CIFF is the container for CRW files. It is an attempt from Canon to make this a standard....
Definition arwfile.cpp:30