libopenraw
crwfile.hpp
1/* -*- Mode: C++ -*- */
2/*
3 * libopenraw - crwfile.h
4 *
5 * Copyright (C) 2006-2015 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_CRWFILE_H_
23#define OR_INTERNALS_CRWFILE_H_
24#include <stdint.h>
25#include <sys/types.h>
26#include <string>
27#include <vector>
28
29#include <libopenraw/consts.h>
30
31#include "rawfile.hpp"
32#include "rawcontainer.hpp"
33#include "io/stream.hpp"
34
35namespace OpenRaw {
36
37class MetaValue;
38class RawData;
39
40namespace Internals {
41
42class CIFFContainer;
43
44class CRWFile
45 : public OpenRaw::RawFile
46{
47public:
48 static RawFile *factory(const IO::Stream::Ptr &);
49 CRWFile(const IO::Stream::Ptr &);
50 virtual ~CRWFile();
51
52 CRWFile(const CRWFile&) = delete;
53 CRWFile & operator=(const CRWFile&) = delete;
54
55protected:
56
57
58 virtual RawContainer* getContainer() const override;
59 virtual ::or_error _enumThumbnailSizes(std::vector<uint32_t> &list) override;
60
61//virtual ::or_error _getThumbnail(uint32_t size, Thumbnail & thumbnail) override;
62
63 virtual ::or_error _getRawData(RawData & data, uint32_t options) override;
64 virtual MetaValue *_getMetaValue(int32_t meta_index) override;
65
66 virtual void _identifyId() override;
67private:
68
69 IO::Stream::Ptr m_io;
70 CIFFContainer *m_container;
71 uint32_t m_x;
72 uint32_t m_y;
73 std::string m_make;
74 std::string m_model;
75
76 static const RawFile::camera_ids_t s_def[];
77};
78
79}
80}
81
82#endif
virtual::or_error _enumThumbnailSizes(std::vector< uint32_t > &list) override
Definition crwfile.cpp:117
virtual RawContainer * getContainer() const override
Definition crwfile.cpp:149
virtual::or_error _getRawData(RawData &data, uint32_t options) override
Definition crwfile.cpp:154
CIFF is the container for CRW files. It is an attempt from Canon to make this a standard....
Definition arwfile.cpp:30