libopenraw
rw2file.hpp
1 /* -*- Mode: C++ -*- */
2 /*
3  * libopenraw - rw2file.h
4  *
5  * Copyright (C) 2006-2016 Hubert Figuiere
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_RW2FILE_H_
23 #define OR_INTERNALS_RW2FILE_H_
24 
25 #include <stdint.h>
26 #include <vector>
27 
28 #include <libopenraw/consts.h>
29 
30 #include "rawfile.hpp"
31 #include "ifddir.hpp"
32 #include "ifdfile.hpp"
33 #include "io/stream.hpp"
34 
35 namespace OpenRaw {
36 
37 class RawData;
38 
39 namespace Internals {
40 
41 class Rw2File
42  : public IfdFile
43 {
44 public:
45  static RawFile *factory(const IO::Stream::Ptr & s);
46  Rw2File(const IO::Stream::Ptr & s);
47  virtual ~Rw2File();
48 
49  Rw2File(const Rw2File&) = delete;
50  Rw2File & operator=(const Rw2File&) = delete;
51 
52  enum {
53  PANA_RAW_COMPRESSION = 0x11000
54  };
55 
56 protected:
57  virtual IfdDir::Ref _locateCfaIfd() override;
58  virtual IfdDir::Ref _locateMainIfd() override;
59 private:
60 
61  virtual ::or_error _locateThumbnail(const IfdDir::Ref & dir,
62  std::vector<uint32_t> &list) override;
63  virtual uint32_t _getJpegThumbnailOffset(const IfdDir::Ref & dir, uint32_t & len) override;
64  virtual ::or_error _getRawData(RawData & data, uint32_t options) override;
65 
66  static const IfdFile::camera_ids_t s_def[];
67 };
68 
69 }
70 }
71 
72 #endif
73 /*
74  Local Variables:
75  mode:c++
76  c-file-style:"stroustrup"
77  c-file-offsets:((innamespace . 0))
78  tab-width:2
79  c-basic-offset:2
80  indent-tabs-mode:nil
81  fill-column:80
82  End:
83 */
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
generic IFD based raw file.
Definition: ifdfile.hpp:48