forked from Exiv2/exiv2
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcr2header_int.hpp
75 lines (65 loc) · 2.61 KB
/
cr2header_int.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
// ***************************************************************** -*- C++ -*-
/*
* Copyright (C) 2004-2021 Exiv2 authors
* This program is part of the Exiv2 distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
*/
/*!
@file cr2image_int.hpp
@brief Internal classes to support CR2 image format
@author Andreas Huggel (ahu)
<a href="mailto:ahuggel@gmx.net">ahuggel@gmx.net</a>
@date 23-Apr-08, ahu: created
*/
#ifndef CR2IMAGE_INT_HPP_
#define CR2IMAGE_INT_HPP_
// *****************************************************************************
// included header files
#include "tiffimage_int.hpp"
// *****************************************************************************
// namespace extensions
namespace Exiv2 {
namespace Internal {
// *****************************************************************************
// class definitions
/// @brief Canon CR2 header structure.
class Cr2Header : public TiffHeaderBase {
public:
//! @name Creators
//@{
//! Default constructor
explicit Cr2Header(ByteOrder byteOrder =littleEndian);
//! Destructor.
~Cr2Header() override = default;
//@}
//! @name Manipulators
//@{
bool read(const byte* pData, uint32_t size) override;
//@}
//! @name Accessors
//@{
DataBuf write() const override;
bool isImageTag(uint16_t tag, IfdId group, const PrimaryGroups* pPrimaryGroups) const override;
//@}
//! Return the address of offset2 from the start of the header
static uint32_t offset2addr() { return 12; }
private:
// DATA
uint32_t offset2_; //!< Bytes 12-15 from the header
static constexpr auto cr2sig_ = "CR\2\0"; //!< Signature for CR2 type TIFF
}; // class Cr2Header
}} // namespace Internal, Exiv2
#endif // #ifndef CR2IMAGE_INT_HPP_