Exiv2
Loading...
Searching...
No Matches
cr2header_int.hpp
1// SPDX-License-Identifier: GPL-2.0-or-later
2
10#ifndef EXIV2_CR2HEADER_INT_HPP
11#define EXIV2_CR2HEADER_INT_HPP
12
13// *****************************************************************************
14// included header files
15#include "tiffimage_int.hpp"
16
17// *****************************************************************************
18// namespace extensions
19namespace Exiv2::Internal {
20// *****************************************************************************
21// class definitions
22
24class Cr2Header : public TiffHeaderBase {
25 public:
27
28
29 explicit Cr2Header(ByteOrder byteOrder = littleEndian);
31
33
34 bool read(const byte* pData, size_t size) override;
36
38
39 [[nodiscard]] DataBuf write() const override;
40 bool isImageTag(uint16_t tag, IfdId group, const PrimaryGroups* pPrimaryGroups) const override;
42
44 static uint32_t offset2addr() {
45 return 12;
46 }
47
48 private:
49 // DATA
50 uint32_t offset2_{0x00000000};
51 static constexpr auto cr2sig_ = "CR\2\0";
52};
53
54} // namespace Exiv2::Internal
55
56#endif // EXIV2_CR2HEADER_INT_HPP
Canon CR2 header structure.
Definition cr2header_int.hpp:24
bool read(const byte *pData, size_t size) override
Read the image header from a data buffer. Return false if the data buffer does not contain an image h...
Definition cr2header_int.cpp:9
DataBuf write() const override
Return the image header in binary format. The caller owns this data and DataBuf ensures that it will ...
Definition cr2header_int.cpp:31
static uint32_t offset2addr()
Return the address of offset2 from the start of the header.
Definition cr2header_int.hpp:44
bool isImageTag(uint16_t tag, IfdId group, const PrimaryGroups *pPrimaryGroups) const override
Return true if the Exif tag from group is an image tag.
Definition cr2header_int.cpp:53
Contains internal objects which are not published and are not part of the libexiv2 API.
Definition tiffimage_int.hpp:29
virtual uint16_t tag() const
Return the tag value (magic number) which identifies the buffer as TIFF data.
Definition tiffimage_int.cpp:2220
virtual uint32_t size() const
Return the size (in bytes) of the image header.
Definition tiffimage_int.cpp:2216
virtual ByteOrder byteOrder() const
Return the byte order (little or big endian).
Definition tiffimage_int.cpp:2200
Helper structure for the Matroska tags lookup table.
Definition matroskavideo.hpp:39
std::vector< IfdId > PrimaryGroups
Type for a list of primary image groups.
Definition tifffwd_int.hpp:80
IfdId
Type to specify the IFD to which a metadata belongs.
Definition tags.hpp:34
ByteOrder
Type to express the byte order (little or big endian)
Definition types.hpp:34
Utility class containing a character array. All it does is to take care of memory allocation and dele...
Definition types.hpp:124