libopenraw
mrwfile.hpp
1 /*
2  * libopenraw - mrwfile.h
3  *
4  * Copyright (C) 2006-2016 Hubert Figuière
5  * Copyright (C) 2008 Bradley Broom
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  */
21 
22 #ifndef OR_INTERNALS_MRWFILE_H_
23 #define OR_INTERNALS_MRWFILE_H_
24 
25 #include <stdint.h>
26 #include <vector>
27 
28 #include <libopenraw/consts.h>
29 
30 #include "rawfile.hpp"
31 #include "ifdfile.hpp"
32 #include "io/stream.hpp"
33 
34 namespace OpenRaw {
35 
36 class RawData;
37 class Thumbnail;
38 
39 namespace Internals {
40 
41 class MRWFile
42  : public IfdFile
43 {
44 public:
45  static RawFile *factory(const IO::Stream::Ptr&);
46  MRWFile(const IO::Stream::Ptr &);
47  virtual ~MRWFile();
48 
49  MRWFile(const MRWFile&) = delete;
50  MRWFile & operator=(const MRWFile&) = delete;
51 
52 protected:
53  virtual IfdDir::Ref _locateCfaIfd() override;
54  virtual IfdDir::Ref _locateMainIfd() override;
55 
56  virtual void _identifyId() override;
57 
58  virtual ::or_error _enumThumbnailSizes(std::vector<uint32_t> &list) override;
59  virtual ::or_error _getThumbnail(uint32_t size, Thumbnail & thumbnail) override;
60  virtual ::or_error _getRawData(RawData & data, uint32_t options) override;
61 private:
62 
63  static const struct IfdFile::camera_ids_t s_def[];
64 };
65 
66 }
67 }
68 
69 #endif
70 /*
71  Local Variables:
72  mode:c++
73  c-file-style:"stroustrup"
74  c-file-offsets:((innamespace . 0))
75  indent-tabs-mode:nil
76  fill-column:80
77  End:
78 */
CIFF is the container for CRW files. It is an attempt from Canon to make this a standard. I guess it failed.
Definition: arwfile.cpp:30
virtual ::or_error _enumThumbnailSizes(std::vector< uint32_t > &list) override
Definition: mrwfile.cpp:140
virtual ::or_error _getRawData(RawData &data, uint32_t options) override
Definition: mrwfile.cpp:218