Loading...
Searching...
No Matches
cr2header_int.hpp
// SPDX-License-Identifier: GPL-2.0-or-later
#ifndef EXIV2_CR2HEADER_INT_HPP
#define EXIV2_CR2HEADER_INT_HPP
// *****************************************************************************
// included header files
#include "tiffimage_int.hpp"
// *****************************************************************************
// namespace extensions
namespace Exiv2::Internal {
// *****************************************************************************
// class definitions
class Cr2Header : public TiffHeaderBase {
public:
explicit Cr2Header(ByteOrder byteOrder = littleEndian);
bool read(const byte* pData, size_t size) override;
[[nodiscard]] DataBuf write() const override;
bool isImageTag(uint16_t tag, IfdId group, const PrimaryGroups* pPrimaryGroups) const override;
static uint32_t offset2addr() {
return 12;
}
private:
// DATA
uint32_t offset2_{0x00000000};
static constexpr auto cr2sig_ = "CR\2\0";
};
} // namespace Exiv2::Internal
#endif // EXIV2_CR2HEADER_INT_HPP
Exiv2::Internal::Cr2Header::read
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
Exiv2::Internal::Cr2Header::write
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
Exiv2::Internal::Cr2Header::offset2addr
static uint32_t offset2addr()
Return the address of offset2 from the start of the header.
Definition cr2header_int.hpp:44
Exiv2::Internal::Cr2Header::isImageTag
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
Exiv2::Internal::Cr2Header::Cr2Header
Cr2Header(ByteOrder byteOrder=littleEndian)
Default constructor.
Definition cr2header_int.cpp:6
Exiv2::Internal::TiffHeaderBase::tag
virtual uint16_t tag() const
Return the tag value (magic number) which identifies the buffer as TIFF data.
Definition tiffimage_int.cpp:2220
Exiv2::Internal::TiffHeaderBase::size
virtual uint32_t size() const
Return the size (in bytes) of the image header.
Definition tiffimage_int.cpp:2216
Exiv2::Internal::TiffHeaderBase::TiffHeaderBase
TiffHeaderBase(uint16_t tag, uint32_t size, ByteOrder byteOrder, uint32_t offset)
Constructor taking tag, size and default byteOrder and offset.
Definition tiffimage_int.cpp:2139
Exiv2::Internal::TiffHeaderBase::byteOrder
virtual ByteOrder byteOrder() const
Return the byte order (little or big endian).
Definition tiffimage_int.cpp:2200
Exiv2::Internal
Helper structure for the Matroska tags lookup table.
Definition matroskavideo.hpp:39
Exiv2::Internal::PrimaryGroups
std::vector< IfdId > PrimaryGroups
Type for a list of primary image groups.
Definition tifffwd_int.hpp:80
Exiv2::IfdId
IfdId
Type to specify the IFD to which a metadata belongs.
Definition tags.hpp:34
Exiv2::ByteOrder
ByteOrder
Type to express the byte order (little or big endian).
Definition types.hpp:34
Exiv2::DataBuf
Utility class containing a character array. All it does is to take care of memory allocation and dele...
Definition types.hpp:124