libopenraw
xtranspattern.cpp
1/*
2 * libopenraw - xtranspattern.cpp
3 *
4 * Copyright (C) 2015 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#include <stdint.h>
22
23#include <libopenraw/consts.h>
24
25#include "cfapattern.hpp"
26#include "xtranspattern.hpp"
27
28namespace OpenRaw {
29namespace Internals {
30
32static const uint8_t RED = OR_PATTERN_COLOUR_RED;
33static const uint8_t GREEN = OR_PATTERN_COLOUR_GREEN;
34static const uint8_t BLUE = OR_PATTERN_COLOUR_BLUE;
35
39static const uint8_t XTRANS_PATTERN[] = {
40 GREEN, BLUE, GREEN, GREEN, RED, GREEN,
41 RED, GREEN, RED, BLUE, GREEN, BLUE,
42 GREEN, BLUE, GREEN, GREEN, RED, GREEN,
43 GREEN, RED, GREEN, GREEN, BLUE, GREEN,
44 BLUE, GREEN, BLUE, RED, GREEN, RED,
45 GREEN, RED, GREEN, GREEN, BLUE, GREEN
46};
47
48XTransPattern::XTransPattern()
49 : CfaPattern(OR_CFA_PATTERN_NON_RGB22, 6, 6)
50{
51 setPatternPattern(XTRANS_PATTERN, 36);
52}
53
54const XTransPattern*
55XTransPattern::xtransPattern()
56{
57 static const XTransPattern* s_pat = new XTransPattern();
58
59 return s_pat;
60}
61
62}
63}
64
65/*
66 Local Variables:
67 mode:c++
68 c-file-style:"stroustrup"
69 c-file-offsets:((innamespace . 0))
70 tab-width:2
71 c-basic-offset:2
72 indent-tabs-mode:nil
73 fill-column:80
74 End:
75*/
CIFF is the container for CRW files. It is an attempt from Canon to make this a standard....
Definition: arwfile.cpp:30