libopenraw
orffile.hpp
1/* -*- Mode: C++ -*- */
2/*
3 * libopenraw - orffile.h
4 *
5 * Copyright (C) 2006-2016 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#ifndef OR_INTERNALS_ORFFILE_H_
23#define OR_INTERNALS_ORFFILE_H_
24
25#include <stdint.h>
26#include <string>
27#include <vector>
28
29#include <libopenraw/consts.h>
30
31#include "rawfile.hpp"
32#include "ifd.hpp"
33#include "ifddir.hpp"
34#include "ifdfile.hpp"
35#include "io/stream.hpp"
36
37namespace OpenRaw {
38
39class RawData;
40
41namespace Internals {
42
43class OrfFile : public IfdFile {
44public:
45 static RawFile *factory(const IO::Stream::Ptr &);
46 OrfFile(const IO::Stream::Ptr &);
47 virtual ~OrfFile();
48
49 OrfFile(const OrfFile &) = delete;
50 OrfFile &operator=(const OrfFile &) = delete;
51
52 enum { ORF_COMPRESSION = 0x10000 };
53
54protected:
55 virtual IfdDir::Ref _locateCfaIfd() override;
56 virtual IfdDir::Ref _locateMainIfd() override;
57
58 ::or_error _enumThumbnailSizes(std::vector<uint32_t> &list) override;
59 virtual ::or_error _getRawData(RawData &data, uint32_t options) override;
60 virtual uint32_t _translateCompressionType(
61 IFD::TiffCompress tiffCompression) override;
62
63private:
64 static RawFile::TypeId _typeIdFromModel(const std::string &model);
65
66 static const IfdFile::camera_ids_t s_def[];
67};
68}
69}
70
71#endif
CIFF is the container for CRW files. It is an attempt from Canon to make this a standard....
Definition: arwfile.cpp:30
::or_error _enumThumbnailSizes(std::vector< uint32_t > &list) override
Definition: orffile.cpp:296
virtual ::or_error _getRawData(RawData &data, uint32_t options) override
Definition: orffile.cpp:344
virtual uint32_t _translateCompressionType(IFD::TiffCompress tiffCompression) override
Definition: orffile.cpp:383