libopenraw  0.3.7
erffile.hpp
1 /* -*- Mode: C++ -*- */
2 /*
3  * libopenraw - erffile.hpp
4  *
5  * Copyright (C) 2007-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  */
21 
22 #pragma
23 
24 #include <stdint.h>
25 
26 #include <libopenraw/consts.h>
27 
28 #include "rawfile.hpp"
29 #include "ifdfile.hpp"
30 #include "io/stream.hpp"
31 #include "tiffepfile.hpp"
32 
33 namespace OpenRaw {
34 
35 namespace Internals {
36 
37 class ERFFile
38  : public TiffEpFile
39 {
40  template<typename T>
41  friend void audit_coefficients();
42 
43 public:
44  static RawFile *factory(const IO::Stream::Ptr &);
45  ERFFile(const IO::Stream::Ptr &);
46  virtual ~ERFFile();
47 
48  ERFFile(const ERFFile&) = delete;
49  ERFFile & operator=(const ERFFile &) = delete;
50 
51 protected:
52  virtual ::or_error _enumThumbnailSizes(std::vector<uint32_t>& list) override;
53  virtual ::or_error _getThumbnail(uint32_t size, Thumbnail& thumbnail) override;
54  virtual ::or_error _getRawData(RawData & data, uint32_t options) override;
55 private:
56  ::or_error getMakerNoteThumbnail(Thumbnail& thumbnail);
57 
58  static const IfdFile::camera_ids_t s_def[];
59 };
60 
61 }
62 }
std::shared_ptr< Stream > Ptr
Definition: stream.hpp:47
virtual ::or_error _getRawData(RawData &data, uint32_t options) override
Get the RAW data.
Definition: erffile.cpp:127
virtual ::or_error _enumThumbnailSizes(std::vector< uint32_t > &list) override
Enumerate the thumbnail sizes.
Definition: erffile.cpp:106
TIFF.EP conformant files.
Definition: tiffepfile.hpp:44
Represent camera raw data.
Definition: rawdata.hpp:38
RAW file.
Definition: rawfile.hpp:66
Represent a thumbnail.
Definition: thumbnail.hpp:32
or_error
Error codes returned by libopenraw.
Definition: consts.h:42
Global namespace for libopenraw.
Definition: arwfile.cpp:29