Loading...
Searching...
No Matches
tiffcomposite_int.hpp
// SPDX-License-Identifier: GPL-2.0-or-later
#ifndef TIFFCOMPOSITE_INT_HPP_
#define TIFFCOMPOSITE_INT_HPP_
// *****************************************************************************
// included header files
#include "tifffwd_int.hpp"
#include <memory>
// *****************************************************************************
// namespace extensions
namespace Exiv2 {
class BasicIo;
namespace Internal {
// *****************************************************************************
// class definitions
using TiffType = uint16_t;
const TiffType ttUnsignedByte = 1;
const TiffType ttAsciiString = 2;
const TiffType ttUnsignedShort = 3;
const TiffType ttUnsignedLong = 4;
const TiffType ttUnsignedRational = 5;
const TiffType ttSignedByte = 6;
const TiffType ttUndefined = 7;
const TiffType ttSignedShort = 8;
const TiffType ttSignedLong = 9;
const TiffType ttSignedRational = 10;
const TiffType ttTiffFloat = 11;
const TiffType ttTiffDouble = 12;
const TiffType ttTiffIfd = 13;
TypeId toTypeId(TiffType tiffType, uint16_t tag, IfdId group);
TiffType toTiffType(TypeId typeId);
namespace Tag {
const uint32_t none = 0x10000;
const uint32_t root = 0x20000;
const uint32_t next = 0x30000;
const uint32_t all = 0x40000;
const uint32_t pana = 0x80000;
const uint32_t fuji = 0x100000;
const uint32_t cmt2 = 0x110000;
const uint32_t cmt3 = 0x120000;
const uint32_t cmt4 = 0x130000;
} // namespace Tag
class TiffPathItem {
public:
constexpr TiffPathItem(uint32_t extendedTag, IfdId group) : extendedTag_(extendedTag), group_(group) {
}
[[nodiscard]] uint16_t tag() const {
return static_cast<uint16_t>(extendedTag_ & 0xffff);
}
[[nodiscard]] uint32_t extendedTag() const {
return extendedTag_;
}
[[nodiscard]] IfdId group() const {
return group_;
}
private:
// DATA
uint32_t extendedTag_;
IfdId group_;
};
class IoWrapper {
public:
IoWrapper(BasicIo& io, const byte* pHeader, size_t size, OffsetWriter* pow);
size_t write(const byte* pData, size_t wcount);
int putb(byte data);
void setTarget(int id, size_t target);
private:
// DATA
BasicIo& io_;
const byte* pHeader_;
size_t size_;
bool wroteHeader_{false};
OffsetWriter* pow_;
};
class TiffComponent {
public:
using UniquePtr = std::unique_ptr<TiffComponent>;
using Components = std::vector<UniquePtr>;
constexpr TiffComponent(uint16_t tag, IfdId group) : tag_(tag), group_(group) {
}
virtual ~TiffComponent() = default;
TiffComponent(const TiffComponent&) = default;
TiffComponent& operator=(const TiffComponent&) = default;
TiffComponent* addPath(uint16_t tag, TiffPath& tiffPath, TiffComponent* pRoot, UniquePtr object = nullptr);
TiffComponent* addChild(UniquePtr tiffComponent);
TiffComponent* addNext(UniquePtr tiffComponent);
void accept(TiffVisitor& visitor);
void setStart(const byte* pStart) {
pStart_ = const_cast<byte*>(pStart);
}
size_t write(IoWrapper& ioWrapper, ByteOrder byteOrder, size_t offset, size_t valueIdx, size_t dataIdx,
size_t& imageIdx);
[[nodiscard]] uint16_t tag() const {
return tag_;
}
[[nodiscard]] IfdId group() const {
return group_;
}
[[nodiscard]] byte* start() const {
return pStart_;
}
[[nodiscard]] UniquePtr clone() const;
size_t writeData(IoWrapper& ioWrapper, ByteOrder byteOrder, size_t offset, size_t dataIdx, size_t& imageIdx) const;
size_t writeImage(IoWrapper& ioWrapper, ByteOrder byteOrder) const;
[[nodiscard]] size_t size() const;
[[nodiscard]] size_t count() const;
[[nodiscard]] size_t sizeData() const;
[[nodiscard]] size_t sizeImage() const;
// Todo: This is only implemented in TiffEntryBase. It is needed here so that
// we can sort components by tag and idx. Something is not quite right.
[[nodiscard]] virtual int idx() const;
protected:
virtual TiffComponent* doAddPath(uint16_t tag, TiffPath& tiffPath, TiffComponent* pRoot,
TiffComponent::UniquePtr object);
virtual TiffComponent* doAddChild(UniquePtr tiffComponent);
virtual TiffComponent* doAddNext(UniquePtr tiffComponent);
virtual void doAccept(TiffVisitor& visitor) = 0;
virtual size_t doWrite(IoWrapper& ioWrapper, ByteOrder byteOrder, size_t offset, size_t valueIdx, size_t dataIdx,
size_t& imageIdx) = 0;
[[nodiscard]] virtual TiffComponent* doClone() const = 0;
virtual size_t doWriteData(IoWrapper& ioWrapper, ByteOrder byteOrder, size_t offset, size_t dataIdx,
size_t& imageIdx) const = 0;
virtual size_t doWriteImage(IoWrapper& ioWrapper, ByteOrder byteOrder) const = 0;
[[nodiscard]] virtual size_t doSize() const = 0;
[[nodiscard]] virtual size_t doCount() const = 0;
[[nodiscard]] virtual size_t doSizeData() const = 0;
[[nodiscard]] virtual size_t doSizeImage() const = 0;
private:
// DATA
uint16_t tag_;
IfdId group_;
byte* pStart_{};
};
struct TiffMappingInfo {
struct Key;
bool operator==(const Key& key) const;
[[nodiscard]] uint16_t tag() const {
return static_cast<uint16_t>(extendedTag_ & 0xffff);
}
// DATA
const char* make_;
uint32_t extendedTag_;
IfdId group_;
DecoderFct decoderFct_;
EncoderFct encoderFct_;
}; // struct TiffMappingInfo
struct TiffMappingInfo::Key {
std::string m_;
uint32_t e_;
IfdId g_;
};
class TiffEntryBase : public TiffComponent {
friend class TiffReader;
friend class TiffEncoder;
public:
constexpr TiffEntryBase(uint16_t tag, IfdId group, TiffType tiffType = ttUndefined) :
TiffComponent(tag, group), tiffType_(tiffType) {
}
~TiffEntryBase() override = default;
TiffEntryBase& operator=(const TiffEntryBase&) = delete;
void encode(TiffEncoder& encoder, const Exifdatum* datum);
void setOffset(size_t offset) {
offset_ = offset;
}
void setData(byte* pData, size_t size, std::shared_ptr<DataBuf> storage);
void setData(std::shared_ptr<DataBuf> buf);
void updateValue(Value::UniquePtr value, ByteOrder byteOrder);
void setValue(Value::UniquePtr value);
[[nodiscard]] TiffType tiffType() const {
return tiffType_;
}
[[nodiscard]] size_t offset() const {
return offset_;
}
[[nodiscard]] int idx() const override;
[[nodiscard]] const byte* pData() const {
return pData_;
}
[[nodiscard]] const Value* pValue() const {
return pValue_.get();
}
protected:
TiffEntryBase(const TiffEntryBase& rhs);
virtual void doEncode(TiffEncoder& encoder, const Exifdatum* datum) = 0;
void setCount(size_t count) {
count_ = count;
}
void setIdx(int idx) {
idx_ = idx;
}
size_t doWrite(IoWrapper& ioWrapper, ByteOrder byteOrder, size_t offset, size_t valueIdx, size_t dataIdx,
size_t& imageIdx) override;
[[nodiscard]] size_t doCount() const override;
size_t doWriteData(IoWrapper& ioWrapper, ByteOrder byteOrder, size_t offset, size_t dataIdx,
size_t& imageIdx) const override;
size_t doWriteImage(IoWrapper& ioWrapper, ByteOrder byteOrder) const override;
[[nodiscard]] size_t doSize() const override;
[[nodiscard]] size_t doSizeData() const override;
[[nodiscard]] size_t doSizeImage() const override;
static size_t writeOffset(byte* buf, size_t offset, TiffType tiffType, ByteOrder byteOrder);
[[nodiscard]] std::shared_ptr<DataBuf> storage() const {
return storage_;
}
private:
// DATA
TiffType tiffType_;
size_t count_{};
size_t offset_{};
size_t size_{};
// Notes on the ownership model of pData_: pData_ is a always a
// pointer to a buffer owned by somebody else. Usually it is a
// pointer into a copy of the image file, but if
// TiffEntryBase::setData is used then it is a pointer into the
// storage_ DataBuf below.
byte* pData_{};
int idx_{};
std::unique_ptr<Value> pValue_;
// This DataBuf is only used when TiffEntryBase::setData is called.
// Otherwise, it remains empty. It is wrapped in a shared_ptr because
// TiffEntryBase has a clone method, which could lead to the DataBuf
// having multiple owners.
std::shared_ptr<DataBuf> storage_;
};
class TiffEntry : public TiffEntryBase {
public:
constexpr TiffEntry(uint16_t tag, IfdId group) : TiffEntryBase(tag, group) {
}
protected:
void doAccept(TiffVisitor& visitor) override;
void doEncode(TiffEncoder& encoder, const Exifdatum* datum) override;
[[nodiscard]] TiffEntry* doClone() const override;
};
class TiffDataEntryBase : public TiffEntryBase {
public:
TiffDataEntryBase(uint16_t tag, IfdId group, uint16_t szTag, IfdId szGroup);
virtual void setStrips(const Value* pSize, const byte* pData, size_t sizeData, size_t baseOffset) = 0;
[[nodiscard]] uint16_t szTag() const {
return szTag_;
}
[[nodiscard]] IfdId szGroup() const {
return szGroup_;
}
private:
// DATA
uint16_t szTag_;
IfdId szGroup_;
};
class TiffDataEntry : public TiffDataEntryBase {
friend class TiffEncoder;
public:
using TiffDataEntryBase::TiffDataEntryBase;
void setStrips(const Value* pSize, const byte* pData, size_t sizeData, size_t baseOffset) override;
protected:
void doAccept(TiffVisitor& visitor) override;
void doEncode(TiffEncoder& encoder, const Exifdatum* datum) override;
size_t doWrite(IoWrapper& ioWrapper, ByteOrder byteOrder, size_t offset, size_t valueIdx, size_t dataIdx,
size_t& imageIdx) override;
[[nodiscard]] TiffDataEntry* doClone() const override;
size_t doWriteData(IoWrapper& ioWrapper, ByteOrder byteOrder, size_t offset, size_t dataIdx,
size_t& imageIdx) const override;
// Using doWriteImage from base class
// Using doSize() from base class
[[nodiscard]] size_t doSizeData() const override;
// Using doSizeImage from base class
private:
// DATA
byte* pDataArea_{};
size_t sizeDataArea_{};
};
class TiffImageEntry : public TiffDataEntryBase {
friend class TiffEncoder;
using TiffDataEntryBase::TiffDataEntryBase;
public:
void setStrips(const Value* pSize, const byte* pData, size_t sizeData, size_t baseOffset) override;
protected:
void doAccept(TiffVisitor& visitor) override;
void doEncode(TiffEncoder& encoder, const Exifdatum* datum) override;
size_t doWrite(IoWrapper& ioWrapper, ByteOrder byteOrder, size_t offset, size_t valueIdx, size_t dataIdx,
size_t& imageIdx) override;
[[nodiscard]] TiffImageEntry* doClone() const override;
size_t doWriteData(IoWrapper& ioWrapper, ByteOrder byteOrder, size_t offset, size_t dataIdx,
size_t& imageIdx) const override;
size_t doWriteImage(IoWrapper& ioWrapper, ByteOrder byteOrder) const override;
[[nodiscard]] size_t doSize() const override;
[[nodiscard]] size_t doSizeData() const override;
[[nodiscard]] size_t doSizeImage() const override;
private:
using Strips = std::vector<std::pair<const byte*, size_t>>;
// DATA
Strips strips_;
};
class TiffSizeEntry : public TiffEntryBase {
public:
constexpr TiffSizeEntry(uint16_t tag, IfdId group, uint16_t dtTag, IfdId dtGroup) :
TiffEntryBase(tag, group), dtTag_(dtTag), dtGroup_(dtGroup) {
}
[[nodiscard]] uint16_t dtTag() const {
return dtTag_;
}
[[nodiscard]] IfdId dtGroup() const {
return dtGroup_;
}
protected:
void doAccept(TiffVisitor& visitor) override;
void doEncode(TiffEncoder& encoder, const Exifdatum* datum) override;
[[nodiscard]] TiffSizeEntry* doClone() const override;
private:
// DATA
uint16_t dtTag_;
IfdId dtGroup_;
};
class TiffDirectory : public TiffComponent {
friend class TiffEncoder;
friend class TiffDecoder;
public:
TiffDirectory(uint16_t tag, IfdId group, bool hasNext = true);
~TiffDirectory() override = default;
TiffDirectory& operator=(const TiffDirectory&) = delete;
[[nodiscard]] bool hasNext() const {
return hasNext_;
}
protected:
TiffDirectory(const TiffDirectory& rhs);
TiffComponent* doAddPath(uint16_t tag, TiffPath& tiffPath, TiffComponent* pRoot,
TiffComponent::UniquePtr object) override;
TiffComponent* doAddChild(TiffComponent::UniquePtr tiffComponent) override;
TiffComponent* doAddNext(TiffComponent::UniquePtr tiffComponent) override;
void doAccept(TiffVisitor& visitor) override;
size_t doWrite(IoWrapper& ioWrapper, ByteOrder byteOrder, size_t offset, size_t valueIdx, size_t dataIdx,
size_t& imageIdx) override;
[[nodiscard]] TiffDirectory* doClone() const override;
size_t doWriteData(IoWrapper& ioWrapper, ByteOrder byteOrder, size_t offset, size_t dataIdx,
size_t& imageIdx) const override;
size_t doWriteImage(IoWrapper& ioWrapper, ByteOrder byteOrder) const override;
[[nodiscard]] size_t doSize() const override;
[[nodiscard]] size_t doCount() const override;
[[nodiscard]] size_t doSizeData() const override;
[[nodiscard]] size_t doSizeImage() const override;
private:
static size_t writeDirEntry(IoWrapper& ioWrapper, ByteOrder byteOrder, size_t offset, TiffComponent* pTiffComponent,
size_t valueIdx, size_t dataIdx, size_t& imageIdx);
// DATA
Components components_;
bool hasNext_;
UniquePtr pNext_;
};
class TiffSubIfd : public TiffEntryBase {
friend class TiffReader;
public:
TiffSubIfd(uint16_t tag, IfdId group, IfdId newGroup);
~TiffSubIfd() override = default;
TiffSubIfd(const TiffSubIfd& rhs);
TiffSubIfd& operator=(const TiffSubIfd&) = delete;
protected:
TiffComponent* doAddPath(uint16_t tag, TiffPath& tiffPath, TiffComponent* pRoot,
TiffComponent::UniquePtr object) override;
TiffComponent* doAddChild(TiffComponent::UniquePtr tiffComponent) override;
void doAccept(TiffVisitor& visitor) override;
void doEncode(TiffEncoder& encoder, const Exifdatum* datum) override;
size_t doWrite(IoWrapper& ioWrapper, ByteOrder byteOrder, size_t offset, size_t valueIdx, size_t dataIdx,
size_t& imageIdx) override;
[[nodiscard]] TiffSubIfd* doClone() const override;
size_t doWriteData(IoWrapper& ioWrapper, ByteOrder byteOrder, size_t offset, size_t dataIdx,
size_t& imageIdx) const override;
size_t doWriteImage(IoWrapper& ioWrapper, ByteOrder byteOrder) const override;
[[nodiscard]] size_t doSize() const override;
[[nodiscard]] size_t doSizeData() const override;
[[nodiscard]] size_t doSizeImage() const override;
private:
using Ifds = std::vector<std::unique_ptr<TiffDirectory>>;
// DATA
IfdId newGroup_;
Ifds ifds_;
};
class TiffMnEntry : public TiffEntryBase {
friend class TiffReader;
friend class TiffDecoder;
friend class TiffEncoder;
public:
constexpr TiffMnEntry(uint16_t tag, IfdId group, IfdId mnGroup) :
TiffEntryBase(tag, group, ttUndefined), mnGroup_(mnGroup) {
}
protected:
TiffComponent* doAddPath(uint16_t tag, TiffPath& tiffPath, TiffComponent* pRoot,
TiffComponent::UniquePtr object) override;
TiffComponent* doAddChild(TiffComponent::UniquePtr tiffComponent) override;
TiffComponent* doAddNext(TiffComponent::UniquePtr tiffComponent) override;
void doAccept(TiffVisitor& visitor) override;
void doEncode(TiffEncoder& encoder, const Exifdatum* datum) override;
size_t doWrite(IoWrapper& ioWrapper, ByteOrder byteOrder, size_t offset, size_t valueIdx, size_t dataIdx,
size_t& imageIdx) override;
[[nodiscard]] TiffMnEntry* doClone() const override;
[[nodiscard]] size_t doCount() const override;
// Using doWriteData from base class
// Using doWriteImage from base class
[[nodiscard]] size_t doSize() const override;
// Using doSizeData from base class
// Using doSizeImage from base class
private:
// DATA
IfdId mnGroup_;
std::unique_ptr<TiffComponent> mn_;
};
class TiffIfdMakernote : public TiffComponent {
friend class TiffReader;
public:
TiffIfdMakernote(uint16_t tag, IfdId group, IfdId mnGroup, std::unique_ptr<MnHeader> pHeader, bool hasNext = true);
~TiffIfdMakernote() override;
TiffIfdMakernote(const TiffIfdMakernote&) = delete;
TiffIfdMakernote& operator=(const TiffIfdMakernote&) = delete;
bool readHeader(const byte* pData, size_t size, ByteOrder byteOrder);
void setByteOrder(ByteOrder byteOrder);
void setImageByteOrder(ByteOrder byteOrder) {
imageByteOrder_ = byteOrder;
}
[[nodiscard]] size_t sizeHeader() const;
size_t writeHeader(IoWrapper& ioWrapper, ByteOrder byteOrder) const;
[[nodiscard]] size_t mnOffset() const;
[[nodiscard]] size_t ifdOffset() const;
[[nodiscard]] ByteOrder byteOrder() const;
[[nodiscard]] size_t baseOffset() const;
protected:
TiffComponent* doAddPath(uint16_t tag, TiffPath& tiffPath, TiffComponent* pRoot,
TiffComponent::UniquePtr object) override;
TiffComponent* doAddChild(TiffComponent::UniquePtr tiffComponent) override;
TiffComponent* doAddNext(TiffComponent::UniquePtr tiffComponent) override;
void doAccept(TiffVisitor& visitor) override;
size_t doWrite(IoWrapper& ioWrapper, ByteOrder byteOrder, size_t offset, size_t valueIdx, size_t dataIdx,
size_t& imageIdx) override;
[[nodiscard]] TiffIfdMakernote* doClone() const override;
size_t doWriteData(IoWrapper& ioWrapper, ByteOrder byteOrder, size_t offset, size_t dataIdx,
size_t& imageIdx) const override;
size_t doWriteImage(IoWrapper& ioWrapper, ByteOrder byteOrder) const override;
[[nodiscard]] size_t doSize() const override;
[[nodiscard]] size_t doCount() const override;
[[nodiscard]] size_t doSizeData() const override;
[[nodiscard]] size_t doSizeImage() const override;
private:
// DATA
std::unique_ptr<MnHeader> pHeader_;
TiffDirectory ifd_;
size_t mnOffset_{};
ByteOrder imageByteOrder_{invalidByteOrder};
};
using CfgSelFct = int (*)(uint16_t, const byte*, size_t, TiffComponent*);
using CryptFct = DataBuf (*)(uint16_t, const byte*, size_t, TiffComponent*);
struct ArrayDef {
bool operator==(size_t idx) const {
return idx_ == idx;
}
[[nodiscard]] size_t size(uint16_t tag, IfdId group) const;
// DATA
size_t idx_;
TiffType tiffType_;
size_t count_;
};
struct ArrayCfg {
[[nodiscard]] size_t tagStep() const {
return elDefaultDef_.size(0, group_);
}
// DATA
IfdId group_;
ByteOrder byteOrder_;
TiffType elTiffType_;
CryptFct cryptFct_;
bool hasSize_;
bool hasFillers_;
bool concat_;
ArrayDef elDefaultDef_;
};
struct ArraySet {
ArrayCfg cfg_;
const ArrayDef* def_;
size_t defSize_;
};
class TiffBinaryArray : public TiffEntryBase {
public:
TiffBinaryArray(uint16_t tag, IfdId group, const ArrayCfg& arrayCfg, const ArrayDef* arrayDef, size_t defSize);
TiffBinaryArray(uint16_t tag, IfdId group, const ArraySet* arraySet, size_t setSize, CfgSelFct cfgSelFct);
~TiffBinaryArray() override = default;
TiffBinaryArray& operator=(const TiffBinaryArray&) = delete;
size_t addElement(size_t idx, const ArrayDef& def);
bool initialize(IfdId group);
bool initialize(TiffComponent* pRoot);
void iniOrigDataBuf();
bool updOrigDataBuf(const byte* pData, size_t size);
void setDecoded(bool decoded) {
decoded_ = decoded;
}
[[nodiscard]] const ArrayCfg* cfg() const {
return arrayCfg_;
}
[[nodiscard]] const ArrayDef* def() const {
return arrayDef_;
}
[[nodiscard]] size_t defSize() const {
return defSize_;
}
[[nodiscard]] bool decoded() const {
return decoded_;
}
protected:
TiffBinaryArray(const TiffBinaryArray& rhs);
TiffComponent* doAddPath(uint16_t tag, TiffPath& tiffPath, TiffComponent* pRoot,
TiffComponent::UniquePtr object) override;
TiffComponent* doAddChild(TiffComponent::UniquePtr tiffComponent) override;
void doAccept(TiffVisitor& visitor) override;
void doEncode(TiffEncoder& encoder, const Exifdatum* datum) override;
size_t doWrite(IoWrapper& ioWrapper, ByteOrder byteOrder, size_t offset, size_t valueIdx, size_t dataIdx,
size_t& imageIdx) override;
[[nodiscard]] TiffBinaryArray* doClone() const override;
[[nodiscard]] size_t doCount() const override;
// Using doWriteData from base class
// Using doWriteImage from base class
[[nodiscard]] size_t doSize() const override;
// Using doSizeData from base class
// Using doSizeImage from base class
private:
// DATA
CfgSelFct cfgSelFct_{};
const ArraySet* arraySet_{};
const ArrayCfg* arrayCfg_{};
const ArrayDef* arrayDef_{};
size_t defSize_{};
size_t setSize_{};
Components elements_;
byte* origData_{};
size_t origSize_{};
TiffComponent* pRoot_{};
bool decoded_{};
};
class TiffBinaryElement : public TiffEntryBase {
using TiffEntryBase::TiffEntryBase;
public:
void setElDef(const ArrayDef& def) {
elDef_ = def;
}
void setElByteOrder(ByteOrder byteOrder) {
elByteOrder_ = byteOrder;
}
[[nodiscard]] const ArrayDef* elDef() const {
return &elDef_;
}
[[nodiscard]] ByteOrder elByteOrder() const {
return elByteOrder_;
}
protected:
void doAccept(TiffVisitor& visitor) override;
void doEncode(TiffEncoder& encoder, const Exifdatum* datum) override;
size_t doWrite(IoWrapper& ioWrapper, ByteOrder byteOrder, size_t offset, size_t valueIdx, size_t dataIdx,
size_t& imageIdx) override;
[[nodiscard]] TiffBinaryElement* doClone() const override;
[[nodiscard]] size_t doCount() const override;
// Using doWriteData from base class
// Using doWriteImage from base class
[[nodiscard]] size_t doSize() const override;
// Using doSizeData from base class
// Using doSizeImage from base class
private:
// DATA
ArrayDef elDef_{0, ttUndefined, 0};
ByteOrder elByteOrder_{invalidByteOrder};
};
// *****************************************************************************
// template, inline and free functions
bool cmpTagLt(const TiffComponent::UniquePtr& lhs, const TiffComponent::UniquePtr& rhs);
bool cmpGroupLt(const std::unique_ptr<TiffDirectory>& lhs, const std::unique_ptr<TiffDirectory>& rhs);
TiffComponent::UniquePtr newTiffEntry(uint16_t tag, IfdId group);
TiffComponent::UniquePtr newTiffMnEntry(uint16_t tag, IfdId group);
TiffComponent::UniquePtr newTiffBinaryElement(uint16_t tag, IfdId group);
template <IfdId newGroup>
TiffComponent::UniquePtr newTiffDirectory(uint16_t tag, IfdId /*group*/) {
return std::make_unique<TiffDirectory>(tag, newGroup);
}
template <IfdId newGroup>
TiffComponent::UniquePtr newTiffSubIfd(uint16_t tag, IfdId group) {
return std::make_unique<TiffSubIfd>(tag, group, newGroup);
}
template <const ArrayCfg& arrayCfg, size_t N, const ArrayDef (&arrayDef)[N]>
TiffComponent::UniquePtr newTiffBinaryArray0(uint16_t tag, IfdId group) {
return std::make_unique<TiffBinaryArray>(tag, group, arrayCfg, arrayDef, N);
}
template <const ArrayCfg& arrayCfg>
TiffComponent::UniquePtr newTiffBinaryArray1(uint16_t tag, IfdId group) {
return std::make_unique<TiffBinaryArray>(tag, group, arrayCfg, nullptr, 0);
}
template <size_t N, const ArraySet (&arraySet)[N], CfgSelFct cfgSelFct>
TiffComponent::UniquePtr newTiffBinaryArray2(uint16_t tag, IfdId group) {
return std::make_unique<TiffBinaryArray>(tag, group, arraySet, N, cfgSelFct);
}
template <uint16_t szTag, IfdId szGroup>
TiffComponent::UniquePtr newTiffThumbData(uint16_t tag, IfdId group) {
return std::make_unique<TiffDataEntry>(tag, group, szTag, szGroup);
}
template <uint16_t dtTag, IfdId dtGroup>
TiffComponent::UniquePtr newTiffThumbSize(uint16_t tag, IfdId group) {
return std::make_unique<TiffSizeEntry>(tag, group, dtTag, dtGroup);
}
template <uint16_t szTag, IfdId szGroup>
TiffComponent::UniquePtr newTiffImageData(uint16_t tag, IfdId group) {
return std::make_unique<TiffImageEntry>(tag, group, szTag, szGroup);
}
template <uint16_t dtTag, IfdId dtGroup>
TiffComponent::UniquePtr newTiffImageSize(uint16_t tag, IfdId group) {
// Todo: Same as newTiffThumbSize - consolidate (rename)?
return std::make_unique<TiffSizeEntry>(tag, group, dtTag, dtGroup);
}
} // namespace Internal
} // namespace Exiv2
#endif // #ifndef TIFFCOMPOSITE_INT_HPP_
Exiv2::BasicIo
An interface for simple binary IO.
Definition basicio.hpp:35
Exiv2::Exifdatum
An Exif metadatum, consisting of an ExifKey and a Value and methods to manipulate these.
Definition exif.hpp:41
Exiv2::Internal::IoWrapper
Simple IO wrapper to ensure that the header is only written if there is any other data at all.
Definition tiffcomposite_int.hpp:102
Exiv2::Internal::IoWrapper::putb
int putb(byte data)
Wraps the corresponding BasicIo::putb() method.
Definition tiffcomposite_int.cpp:46
Exiv2::Internal::IoWrapper::setTarget
void setTarget(int id, size_t target)
Wrapper for OffsetWriter::setTarget(), using an int instead of the enum to reduce include deps.
Definition tiffcomposite_int.cpp:54
Exiv2::Internal::IoWrapper::write
size_t write(const byte *pData, size_t wcount)
Wraps the corresponding BasicIo::write() method.
Definition tiffcomposite_int.cpp:38
Exiv2::Internal::IoWrapper::IoWrapper
IoWrapper(BasicIo &io, const byte *pHeader, size_t size, OffsetWriter *pow)
Definition tiffcomposite_int.cpp:32
Exiv2::Internal::OffsetWriter
Class to insert pointers or offsets to computed addresses at specific locations in an image....
Definition tiffimage_int.hpp:295
Exiv2::Internal::TiffBinaryArray
Composite to model an array of different tags. The tag types as well as other aspects of the array ar...
Definition tiffcomposite_int.hpp:1263
Exiv2::Internal::TiffBinaryArray::addElement
size_t addElement(size_t idx, const ArrayDef &def)
Add an element to the binary array, return the size of the element.
Definition tiffcomposite_int.cpp:383
Exiv2::Internal::TiffBinaryArray::cfg
const ArrayCfg * cfg() const
Return a pointer to the configuration.
Definition tiffcomposite_int.hpp:1316
Exiv2::Internal::TiffBinaryArray::doClone
TiffBinaryArray * doClone() const override
Internal virtual copy constructor, implements clone().
Definition tiffcomposite_int.cpp:157
Exiv2::Internal::TiffBinaryArray::initialize
bool initialize(IfdId group)
Setup cfg and def for the component, in case of a complex binary array. Else do nothing....
Definition tiffcomposite_int.cpp:341
Exiv2::Internal::TiffBinaryArray::setDecoded
void setDecoded(bool decoded)
Set a flag to indicate if the array was decoded.
Definition tiffcomposite_int.hpp:1308
Exiv2::Internal::TiffBinaryArray::doEncode
void doEncode(TiffEncoder &encoder, const Exifdatum *datum) override
Implements encode().
Definition tiffcomposite_int.cpp:698
Exiv2::Internal::TiffBinaryArray::decoded
bool decoded() const
Return the flag which indicates if the array was decoded.
Definition tiffcomposite_int.hpp:1328
Exiv2::Internal::TiffBinaryArray::doAccept
void doAccept(TiffVisitor &visitor) override
Implements accept().
Definition tiffcomposite_int.cpp:675
Exiv2::Internal::TiffBinaryArray::doSize
size_t doSize() const override
Implements size(). Todo: Document it!
Definition tiffcomposite_int.cpp:1311
Exiv2::Internal::TiffBinaryArray::iniOrigDataBuf
void iniOrigDataBuf()
Initialize the original data buffer and its size from the base entry.
Definition tiffcomposite_int.cpp:369
Exiv2::Internal::TiffBinaryArray::def
const ArrayDef * def() const
Return a pointer to the definition.
Definition tiffcomposite_int.hpp:1320
Exiv2::Internal::TiffBinaryArray::~TiffBinaryArray
~TiffBinaryArray() override=default
Virtual destructor.
Exiv2::Internal::TiffBinaryArray::doAddChild
TiffComponent * doAddChild(TiffComponent::UniquePtr tiffComponent) override
Implements addChild(). Todo: Document it!
Definition tiffcomposite_int.cpp:577
Exiv2::Internal::TiffBinaryArray::updOrigDataBuf
bool updOrigDataBuf(const byte *pData, size_t size)
Update the original data buffer and its size, return true if successful.
Definition tiffcomposite_int.cpp:374
Exiv2::Internal::TiffBinaryArray::doWrite
size_t doWrite(IoWrapper &ioWrapper, ByteOrder byteOrder, size_t offset, size_t valueIdx, size_t dataIdx, size_t &imageIdx) override
Implements write(). Todo: Document it!
Definition tiffcomposite_int.cpp:1038
Exiv2::Internal::TiffBinaryArray::doAddPath
TiffComponent * doAddPath(uint16_t tag, TiffPath &tiffPath, TiffComponent *pRoot, TiffComponent::UniquePtr object) override
Implements addPath(). Todo: Document it!
Definition tiffcomposite_int.cpp:506
Exiv2::Internal::TiffBinaryArray::doCount
size_t doCount() const override
Implements count(). Todo: Document it!
Definition tiffcomposite_int.cpp:758
Exiv2::Internal::TiffBinaryArray::TiffBinaryArray
TiffBinaryArray(uint16_t tag, IfdId group, const ArrayCfg &arrayCfg, const ArrayDef *arrayDef, size_t defSize)
Constructor.
Definition tiffcomposite_int.cpp:76
Exiv2::Internal::TiffBinaryArray::defSize
size_t defSize() const
Return the number of elements in the definition.
Definition tiffcomposite_int.hpp:1324
Exiv2::Internal::TiffBinaryElement
Element of a TiffBinaryArray.
Definition tiffcomposite_int.hpp:1394
Exiv2::Internal::TiffBinaryElement::doWrite
size_t doWrite(IoWrapper &ioWrapper, ByteOrder byteOrder, size_t offset, size_t valueIdx, size_t dataIdx, size_t &imageIdx) override
Implements write(). Todo: Document it!
Definition tiffcomposite_int.cpp:1097
Exiv2::Internal::TiffBinaryElement::setElDef
void setElDef(const ArrayDef &def)
Set the array definition for this element.
Definition tiffcomposite_int.hpp:1403
Exiv2::Internal::TiffBinaryElement::doEncode
void doEncode(TiffEncoder &encoder, const Exifdatum *datum) override
Implements encode().
Definition tiffcomposite_int.cpp:694
Exiv2::Internal::TiffBinaryElement::doCount
size_t doCount() const override
Implements count(). Returns the count from the element definition.
Definition tiffcomposite_int.cpp:778
Exiv2::Internal::TiffBinaryElement::doAccept
void doAccept(TiffVisitor &visitor) override
Implements accept().
Definition tiffcomposite_int.cpp:686
Exiv2::Internal::TiffBinaryElement::elDef
const ArrayDef * elDef() const
Return the array definition of this element.
Definition tiffcomposite_int.hpp:1419
Exiv2::Internal::TiffBinaryElement::setElByteOrder
void setElByteOrder(ByteOrder byteOrder)
Set the byte order of this element.
Definition tiffcomposite_int.hpp:1409
Exiv2::Internal::TiffBinaryElement::doSize
size_t doSize() const override
Implements size(). Returns count * type-size, both taken from the element definition.
Definition tiffcomposite_int.cpp:1340
Exiv2::Internal::TiffBinaryElement::elByteOrder
ByteOrder elByteOrder() const
Return the byte order of this element.
Definition tiffcomposite_int.hpp:1425
Exiv2::Internal::TiffBinaryElement::doClone
TiffBinaryElement * doClone() const override
Internal virtual copy constructor, implements clone().
Definition tiffcomposite_int.cpp:161
Exiv2::Internal::TiffComponent
Interface class for components of a TIFF directory hierarchy (Composite pattern). Both TIFF directori...
Definition tiffcomposite_int.hpp:152
Exiv2::Internal::TiffComponent::Components
std::vector< UniquePtr > Components
Container type to hold all metadata.
Definition tiffcomposite_int.hpp:157
Exiv2::Internal::TiffComponent::TiffComponent
constexpr TiffComponent(uint16_t tag, IfdId group)
Constructor.
Definition tiffcomposite_int.hpp:162
Exiv2::Internal::TiffComponent::doClone
virtual TiffComponent * doClone() const =0
Internal virtual copy constructor, implements clone().
Exiv2::Internal::TiffComponent::start
byte * start() const
Return a pointer to the start of the binary representation of the component.
Definition tiffcomposite_int.hpp:242
Exiv2::Internal::TiffComponent::clone
UniquePtr clone() const
Return an auto-pointer to a copy of itself (deep copy, but without any children). The caller owns thi...
Definition tiffcomposite_int.cpp:121
Exiv2::Internal::TiffComponent::doWriteImage
virtual size_t doWriteImage(IoWrapper &ioWrapper, ByteOrder byteOrder) const =0
Implements writeImage().
Exiv2::Internal::TiffComponent::doSize
virtual size_t doSize() const =0
Implements size().
Exiv2::Internal::TiffComponent::doCount
virtual size_t doCount() const =0
Implements count().
Exiv2::Internal::TiffComponent::tag
uint16_t tag() const
Return the tag of this entry.
Definition tiffcomposite_int.hpp:234
Exiv2::Internal::TiffComponent::doSizeImage
virtual size_t doSizeImage() const =0
Implements sizeImage().
Exiv2::Internal::TiffComponent::setStart
void setStart(const byte *pStart)
Set a pointer to the start of the binary representation of the component in a memory buffer....
Definition tiffcomposite_int.hpp:210
Exiv2::Internal::TiffComponent::write
size_t write(IoWrapper &ioWrapper, ByteOrder byteOrder, size_t offset, size_t valueIdx, size_t dataIdx, size_t &imageIdx)
Write a TiffComponent to a binary image.
Definition tiffcomposite_int.cpp:782
Exiv2::Internal::TiffComponent::addChild
TiffComponent * addChild(UniquePtr tiffComponent)
Add a child to the component. Default is to do nothing.
Definition tiffcomposite_int.cpp:542
Exiv2::Internal::TiffComponent::sizeImage
size_t sizeImage() const
Return the size in bytes of the image data of this component when written to a binary image....
Definition tiffcomposite_int.cpp:1385
Exiv2::Internal::TiffComponent::doWriteData
virtual size_t doWriteData(IoWrapper &ioWrapper, ByteOrder byteOrder, size_t offset, size_t dataIdx, size_t &imageIdx) const =0
Implements writeData().
Exiv2::Internal::TiffComponent::sizeData
size_t sizeData() const
Return the size in bytes of the IFD data of this component when written to a binary image....
Definition tiffcomposite_int.cpp:1346
Exiv2::Internal::TiffComponent::addPath
TiffComponent * addPath(uint16_t tag, TiffPath &tiffPath, TiffComponent *pRoot, UniquePtr object=nullptr)
Add a TIFF entry tag to the component. Components on the path to the entry are added if they don't ex...
Definition tiffcomposite_int.cpp:399
Exiv2::Internal::TiffComponent::doAddChild
virtual TiffComponent * doAddChild(UniquePtr tiffComponent)
Implements addChild(). The default implementation does nothing.
Definition tiffcomposite_int.cpp:546
Exiv2::Internal::TiffComponent::~TiffComponent
virtual ~TiffComponent()=default
Virtual destructor.
Exiv2::Internal::TiffComponent::doAccept
virtual void doAccept(TiffVisitor &visitor)=0
Implements accept().
Exiv2::Internal::TiffComponent::writeImage
size_t writeImage(IoWrapper &ioWrapper, ByteOrder byteOrder) const
Write the image data of this component to a binary image. Return the number of bytes written....
Definition tiffcomposite_int.cpp:1172
Exiv2::Internal::TiffComponent::doSizeData
virtual size_t doSizeData() const =0
Implements sizeData().
Exiv2::Internal::TiffComponent::idx
virtual int idx() const
Return the unique id of the entry in the image.
Definition tiffcomposite_int.cpp:165
Exiv2::Internal::TiffComponent::doAddPath
virtual TiffComponent * doAddPath(uint16_t tag, TiffPath &tiffPath, TiffComponent *pRoot, TiffComponent::UniquePtr object)
Implements addPath(). The default implementation does nothing.
Definition tiffcomposite_int.cpp:404
Exiv2::Internal::TiffComponent::UniquePtr
std::unique_ptr< TiffComponent > UniquePtr
TiffComponent auto_ptr type.
Definition tiffcomposite_int.hpp:155
Exiv2::Internal::TiffComponent::writeData
size_t writeData(IoWrapper &ioWrapper, ByteOrder byteOrder, size_t offset, size_t dataIdx, size_t &imageIdx) const
Write the IFD data of this component to a binary image. Return the number of bytes written....
Definition tiffcomposite_int.cpp:1108
Exiv2::Internal::TiffComponent::group
IfdId group() const
Return the group id of this component.
Definition tiffcomposite_int.hpp:238
Exiv2::Internal::TiffComponent::addNext
TiffComponent * addNext(UniquePtr tiffComponent)
Add a "next" component to the component. Default is to do nothing.
Definition tiffcomposite_int.cpp:583
Exiv2::Internal::TiffComponent::doAddNext
virtual TiffComponent * doAddNext(UniquePtr tiffComponent)
Implements addNext(). The default implementation does nothing.
Definition tiffcomposite_int.cpp:587
Exiv2::Internal::TiffComponent::doWrite
virtual size_t doWrite(IoWrapper &ioWrapper, ByteOrder byteOrder, size_t offset, size_t valueIdx, size_t dataIdx, size_t &imageIdx)=0
Implements write().
Exiv2::Internal::TiffComponent::size
size_t size() const
Return the size in bytes of the IFD value of this component when written to a binary image.
Definition tiffcomposite_int.cpp:1258
Exiv2::Internal::TiffComponent::accept
void accept(TiffVisitor &visitor)
Interface to accept visitors (Visitor pattern). Visitors can perform operations on all components of ...
Definition tiffcomposite_int.cpp:611
Exiv2::Internal::TiffComponent::count
size_t count() const
Return the number of components in this component.
Definition tiffcomposite_int.cpp:726
Exiv2::Internal::TiffDataEntryBase::szGroup
IfdId szGroup() const
Return the group of the entry which has the size.
Definition tiffcomposite_int.hpp:627
Exiv2::Internal::TiffDataEntryBase::TiffDataEntryBase
TiffDataEntryBase(uint16_t tag, IfdId group, uint16_t szTag, IfdId szGroup)
Constructor.
Definition tiffvisitor_int.cpp:341
Exiv2::Internal::TiffDataEntryBase::setStrips
virtual void setStrips(const Value *pSize, const byte *pData, size_t sizeData, size_t baseOffset)=0
Set the data areas ("strips").
Exiv2::Internal::TiffDataEntryBase::szTag
uint16_t szTag() const
Return the group of the entry which has the size.
Definition tiffcomposite_int.hpp:623
Exiv2::Internal::TiffDataEntry
A standard TIFF IFD entry consisting of a value which is an offset to a data area and the data area....
Definition tiffcomposite_int.hpp:649
Exiv2::Internal::TiffDataEntry::doWrite
size_t doWrite(IoWrapper &ioWrapper, ByteOrder byteOrder, size_t offset, size_t valueIdx, size_t dataIdx, size_t &imageIdx) override
Implements write(). Write pointers into the data area to the ioWrapper, relative to the offsets in th...
Definition tiffcomposite_int.cpp:964
Exiv2::Internal::TiffDataEntry::doWriteData
size_t doWriteData(IoWrapper &ioWrapper, ByteOrder byteOrder, size_t offset, size_t dataIdx, size_t &imageIdx) const override
Implements writeData(). Write the data area to the ioWrapper. Return the number of bytes written.
Definition tiffcomposite_int.cpp:1137
Exiv2::Internal::TiffDataEntry::doAccept
void doAccept(TiffVisitor &visitor) override
Implements accept().
Definition tiffcomposite_int.cpp:620
Exiv2::Internal::TiffDataEntry::TiffDataEntryBase
TiffDataEntryBase(uint16_t tag, IfdId group, uint16_t szTag, IfdId szGroup)
Constructor.
Definition tiffvisitor_int.cpp:341
Exiv2::Internal::TiffDataEntry::doSizeData
size_t doSizeData() const override
Implements sizeData(). Return the size of the data area.
Definition tiffcomposite_int.cpp:1367
Exiv2::Internal::TiffDataEntry::setStrips
void setStrips(const Value *pSize, const byte *pData, size_t sizeData, size_t baseOffset) override
Set the data areas ("strips").
Definition tiffcomposite_int.cpp:209
Exiv2::Internal::TiffDataEntry::doEncode
void doEncode(TiffEncoder &encoder, const Exifdatum *datum) override
Implements encode().
Definition tiffcomposite_int.cpp:702
Exiv2::Internal::TiffDataEntry::doClone
TiffDataEntry * doClone() const override
Internal virtual copy constructor, implements clone().
Definition tiffcomposite_int.cpp:129
Exiv2::Internal::TiffDirectory
This class models a TIFF directory (Ifd). It is a composite component of the TIFF tree.
Definition tiffcomposite_int.hpp:823
Exiv2::Internal::TiffDirectory::TiffDirectory
TiffDirectory(uint16_t tag, IfdId group, bool hasNext=true)
Default constructor.
Definition tiffcomposite_int.cpp:62
Exiv2::Internal::TiffDirectory::doAddChild
TiffComponent * doAddChild(TiffComponent::UniquePtr tiffComponent) override
Implements addChild(). The default implementation does nothing.
Definition tiffcomposite_int.cpp:550
Exiv2::Internal::TiffDirectory::doAccept
void doAccept(TiffVisitor &visitor) override
Implements accept().
Definition tiffcomposite_int.cpp:632
Exiv2::Internal::TiffDirectory::doWriteData
size_t doWriteData(IoWrapper &ioWrapper, ByteOrder byteOrder, size_t offset, size_t dataIdx, size_t &imageIdx) const override
This class does not really implement writeData(), it only has write(). This method must not be called...
Definition tiffcomposite_int.cpp:1113
Exiv2::Internal::TiffDirectory::doSizeImage
size_t doSizeImage() const override
Implements sizeImage(). Return the sum of the image sizes of all components plus that of the next-IFD...
Definition tiffcomposite_int.cpp:1389
Exiv2::Internal::TiffDirectory::doAddPath
TiffComponent * doAddPath(uint16_t tag, TiffPath &tiffPath, TiffComponent *pRoot, TiffComponent::UniquePtr object) override
Implements addPath(). The default implementation does nothing.
Definition tiffcomposite_int.cpp:409
Exiv2::Internal::TiffDirectory::doSize
size_t doSize() const override
Implements size(). Return the size of the TIFF directory, values and additional data,...
Definition tiffcomposite_int.cpp:1262
Exiv2::Internal::TiffDirectory::hasNext
bool hasNext() const
Return true if the directory has a next pointer.
Definition tiffcomposite_int.hpp:845
Exiv2::Internal::TiffDirectory::doWrite
size_t doWrite(IoWrapper &ioWrapper, ByteOrder byteOrder, size_t offset, size_t valueIdx, size_t dataIdx, size_t &imageIdx) override
Implements write(). Write the TIFF directory, values and additional data, including the next-IFD,...
Definition tiffcomposite_int.cpp:787
Exiv2::Internal::TiffDirectory::doSizeData
size_t doSizeData() const override
This class does not really implement sizeData(), it only has size(). This method must not be called; ...
Definition tiffcomposite_int.cpp:1350
Exiv2::Internal::TiffDirectory::doCount
size_t doCount() const override
Implements count(). Return the number of entries in the TIFF directory. Does not count entries which ...
Definition tiffcomposite_int.cpp:730
Exiv2::Internal::TiffDirectory::operator=
TiffDirectory & operator=(const TiffDirectory &)=delete
Assignment operator.
Exiv2::Internal::TiffDirectory::~TiffDirectory
~TiffDirectory() override=default
Virtual destructor.
Exiv2::Internal::TiffDirectory::doClone
TiffDirectory * doClone() const override
Internal virtual copy constructor, implements clone().
Definition tiffcomposite_int.cpp:141
Exiv2::Internal::TiffDirectory::doAddNext
TiffComponent * doAddNext(TiffComponent::UniquePtr tiffComponent) override
Implements addNext(). The default implementation does nothing.
Definition tiffcomposite_int.cpp:591
Exiv2::Internal::TiffDirectory::doWriteImage
size_t doWriteImage(IoWrapper &ioWrapper, ByteOrder byteOrder) const override
Implements writeImage(). Write the image data of the TIFF directory to the ioWrapper by forwarding th...
Definition tiffcomposite_int.cpp:1176
Exiv2::Internal::TiffEncoder
TIFF composite visitor to encode metadata from an image to the TIFF tree. The metadata containers and...
Definition tiffvisitor_int.hpp:343
Exiv2::Internal::TiffEntryBase
This abstract base class provides the common functionality of an IFD directory entry and defines an e...
Definition tiffcomposite_int.hpp:380
Exiv2::Internal::TiffEntryBase::doSize
size_t doSize() const override
Implements size(). Return the size of a standard TIFF entry.
Definition tiffcomposite_int.cpp:1288
Exiv2::Internal::TiffEntryBase::updateValue
void updateValue(Value::UniquePtr value, ByteOrder byteOrder)
Update the value. Takes ownership of the pointer passed in.
Definition tiffcomposite_int.cpp:187
Exiv2::Internal::TiffEntryBase::encode
void encode(TiffEncoder &encoder, const Exifdatum *datum)
Encode a TIFF component from the metadatum provided and information from the encoder as needed.
Definition tiffcomposite_int.cpp:690
Exiv2::Internal::TiffEntryBase::offset
size_t offset() const
Return the offset to the data area relative to the base for the component (usually the start of the T...
Definition tiffcomposite_int.hpp:462
Exiv2::Internal::TiffEntryBase::doSizeData
size_t doSizeData() const override
Implements sizeData(). Return 0.
Definition tiffcomposite_int.cpp:1354
Exiv2::Internal::TiffEntryBase::setIdx
void setIdx(int idx)
Set the unique id of the entry in the image.
Definition tiffcomposite_int.hpp:498
Exiv2::Internal::TiffEntryBase::setData
void setData(byte *pData, size_t size, std::shared_ptr< DataBuf > storage)
Set pointer and size of the entry's data (not taking ownership of the data).
Definition tiffcomposite_int.cpp:179
Exiv2::Internal::TiffEntryBase::pData
const byte * pData() const
Return a pointer to the binary representation of the value of this component.
Definition tiffcomposite_int.hpp:473
Exiv2::Internal::TiffEntryBase::tiffType
TiffType tiffType() const
Return the TIFF type.
Definition tiffcomposite_int.hpp:455
Exiv2::Internal::TiffEntryBase::doWrite
size_t doWrite(IoWrapper &ioWrapper, ByteOrder byteOrder, size_t offset, size_t valueIdx, size_t dataIdx, size_t &imageIdx) override
Implements write(). Write the value of a standard TIFF entry to the ioWrapper, return the number of b...
Definition tiffcomposite_int.cpp:934
Exiv2::Internal::TiffEntryBase::operator=
TiffEntryBase & operator=(const TiffEntryBase &)=delete
Assignment operator.
Exiv2::Internal::TiffEntryBase::TiffEntryBase
constexpr TiffEntryBase(uint16_t tag, IfdId group, TiffType tiffType=ttUndefined)
Default constructor.
Definition tiffcomposite_int.hpp:388
Exiv2::Internal::TiffEntryBase::doCount
size_t doCount() const override
Implements count().
Definition tiffcomposite_int.cpp:734
Exiv2::Internal::TiffEntryBase::pValue
const Value * pValue() const
Return a const pointer to the converted value of this component.
Definition tiffcomposite_int.hpp:477
Exiv2::Internal::TiffEntryBase::setOffset
void setOffset(size_t offset)
Set the offset.
Definition tiffcomposite_int.hpp:413
Exiv2::Internal::TiffEntryBase::doEncode
virtual void doEncode(TiffEncoder &encoder, const Exifdatum *datum)=0
Implements encode().
Exiv2::Internal::TiffEntryBase::idx
int idx() const override
Return the unique id of the entry in the image.
Definition tiffcomposite_int.cpp:169
Exiv2::Internal::TiffEntryBase::setCount
void setCount(size_t count)
Set the number of components in this entry.
Definition tiffcomposite_int.hpp:494
Exiv2::Internal::TiffEntryBase::doWriteData
size_t doWriteData(IoWrapper &ioWrapper, ByteOrder byteOrder, size_t offset, size_t dataIdx, size_t &imageIdx) const override
Implements writeData(). Standard TIFF entries have no data: write nothing and return 0.
Definition tiffcomposite_int.cpp:1122
Exiv2::Internal::TiffEntryBase::~TiffEntryBase
~TiffEntryBase() override=default
Virtual destructor.
Exiv2::Internal::TiffEntryBase::doWriteImage
size_t doWriteImage(IoWrapper &ioWrapper, ByteOrder byteOrder) const override
Implements writeImage(). Standard TIFF entries have no image data: write nothing and return 0.
Definition tiffcomposite_int.cpp:1201
Exiv2::Internal::TiffEntryBase::doSizeImage
size_t doSizeImage() const override
Implements sizeImage(). Return 0.
Definition tiffcomposite_int.cpp:1412
Exiv2::Internal::TiffEntryBase::storage
std::shared_ptr< DataBuf > storage() const
Used (internally) to create another reference to the DataBuf reference by storage_.
Definition tiffcomposite_int.hpp:537
Exiv2::Internal::TiffEntryBase::writeOffset
static size_t writeOffset(byte *buf, size_t offset, TiffType tiffType, ByteOrder byteOrder)
Helper function to write an offset to a preallocated binary buffer.
Definition tiffcomposite_int.cpp:945
Exiv2::Internal::TiffEntryBase::setValue
void setValue(Value::UniquePtr value)
Set tag value. Takes ownership of the pointer passed in.
Definition tiffcomposite_int.cpp:201
Exiv2::Internal::TiffEntry
A standard TIFF IFD entry.
Definition tiffcomposite_int.hpp:568
Exiv2::Internal::TiffEntry::doAccept
void doAccept(TiffVisitor &visitor) override
Implements accept().
Definition tiffcomposite_int.cpp:616
Exiv2::Internal::TiffEntry::doClone
TiffEntry * doClone() const override
Internal virtual copy constructor, implements clone().
Definition tiffcomposite_int.cpp:125
Exiv2::Internal::TiffEntry::TiffEntry
constexpr TiffEntry(uint16_t tag, IfdId group)
Constructor.
Definition tiffcomposite_int.hpp:573
Exiv2::Internal::TiffEntry::doEncode
void doEncode(TiffEncoder &encoder, const Exifdatum *datum) override
Implements encode().
Definition tiffcomposite_int.cpp:706
Exiv2::Internal::TiffIfdMakernote
Tiff IFD Makernote. This is a concrete class suitable for all IFD makernotes.
Definition tiffcomposite_int.hpp:1067
Exiv2::Internal::TiffIfdMakernote::doCount
size_t doCount() const override
Implements count(). Return the number of entries in the IFD of the Makernote. Does not count entries ...
Definition tiffcomposite_int.cpp:754
Exiv2::Internal::TiffIfdMakernote::baseOffset
size_t baseOffset() const
Return the base offset for use with the makernote IFD entries relative to the start of the TIFF heade...
Definition tiffcomposite_int.cpp:307
Exiv2::Internal::TiffIfdMakernote::readHeader
bool readHeader(const byte *pData, size_t size, ByteOrder byteOrder)
Read the header from a data buffer, return true if successful.
Definition tiffcomposite_int.cpp:313
Exiv2::Internal::TiffIfdMakernote::writeHeader
size_t writeHeader(IoWrapper &ioWrapper, ByteOrder byteOrder) const
Write the header to a data buffer, return the number of bytes written.
Definition tiffcomposite_int.cpp:330
Exiv2::Internal::TiffIfdMakernote::doAddNext
TiffComponent * doAddNext(TiffComponent::UniquePtr tiffComponent) override
Implements addNext(). The default implementation does nothing.
Definition tiffcomposite_int.cpp:607
Exiv2::Internal::TiffIfdMakernote::setByteOrder
void setByteOrder(ByteOrder byteOrder)
Set the byte order for the makernote.
Definition tiffcomposite_int.cpp:319
Exiv2::Internal::TiffIfdMakernote::doSizeImage
size_t doSizeImage() const override
Implements sizeImage(). Return the total image data size of the makernote IFD.
Definition tiffcomposite_int.cpp:1408
Exiv2::Internal::TiffIfdMakernote::doWriteImage
size_t doWriteImage(IoWrapper &ioWrapper, ByteOrder byteOrder) const override
Implements writeImage(). Write the image data of the IFD of the Makernote. Return the number of bytes...
Definition tiffcomposite_int.cpp:1213
Exiv2::Internal::TiffIfdMakernote::sizeHeader
size_t sizeHeader() const
Return the size of the header in bytes.
Definition tiffcomposite_int.cpp:324
Exiv2::Internal::TiffIfdMakernote::mnOffset
size_t mnOffset() const
Return the offset to the makernote from the start of the TIFF header.
Definition tiffcomposite_int.cpp:303
Exiv2::Internal::TiffIfdMakernote::doAddPath
TiffComponent * doAddPath(uint16_t tag, TiffPath &tiffPath, TiffComponent *pRoot, TiffComponent::UniquePtr object) override
Implements addPath(). The default implementation does nothing.
Definition tiffcomposite_int.cpp:501
Exiv2::Internal::TiffIfdMakernote::doAccept
void doAccept(TiffVisitor &visitor) override
Implements accept().
Definition tiffcomposite_int.cpp:666
Exiv2::Internal::TiffIfdMakernote::doWriteData
size_t doWriteData(IoWrapper &ioWrapper, ByteOrder byteOrder, size_t offset, size_t dataIdx, size_t &imageIdx) const override
This class does not really implement writeData(), it only has write(). This method must not be called...
Definition tiffcomposite_int.cpp:1167
Exiv2::Internal::TiffIfdMakernote::~TiffIfdMakernote
~TiffIfdMakernote() override
Virtual destructor.
Exiv2::Internal::TiffIfdMakernote::doClone
TiffIfdMakernote * doClone() const override
Internal virtual copy constructor, implements clone().
Definition tiffcomposite_int.cpp:153
Exiv2::Internal::TiffIfdMakernote::setImageByteOrder
void setImageByteOrder(ByteOrder byteOrder)
Set the byte order used for the image.
Definition tiffcomposite_int.hpp:1108
Exiv2::Internal::TiffIfdMakernote::doSizeData
size_t doSizeData() const override
This class does not really implement sizeData(), it only has size(). This method must not be called; ...
Definition tiffcomposite_int.cpp:1381
Exiv2::Internal::TiffIfdMakernote::doWrite
size_t doWrite(IoWrapper &ioWrapper, ByteOrder byteOrder, size_t offset, size_t valueIdx, size_t dataIdx, size_t &imageIdx) override
Implements write(). Write the Makernote header, TIFF directory, values and additional data to the ioW...
Definition tiffcomposite_int.cpp:1028
Exiv2::Internal::TiffIfdMakernote::byteOrder
ByteOrder byteOrder() const
Return the byte order for the makernote. Requires the image byte order to be set (setImageByteOrder()...
Definition tiffcomposite_int.cpp:296
Exiv2::Internal::TiffIfdMakernote::ifdOffset
size_t ifdOffset() const
Return the offset to the start of the Makernote IFD from the start of the Makernote....
Definition tiffcomposite_int.cpp:290
Exiv2::Internal::TiffIfdMakernote::TiffIfdMakernote
TiffIfdMakernote(uint16_t tag, IfdId group, IfdId mnGroup, std::unique_ptr< MnHeader > pHeader, bool hasNext=true)
Default constructor.
Definition tiffcomposite_int.cpp:69
Exiv2::Internal::TiffIfdMakernote::TiffIfdMakernote
TiffIfdMakernote(const TiffIfdMakernote &)=delete
Copy constructor.
Exiv2::Internal::TiffIfdMakernote::operator=
TiffIfdMakernote & operator=(const TiffIfdMakernote &)=delete
Assignment operator.
Exiv2::Internal::TiffIfdMakernote::doSize
size_t doSize() const override
Implements size(). Return the size of the Makernote header, TIFF directory, values and additional dat...
Definition tiffcomposite_int.cpp:1307
Exiv2::Internal::TiffIfdMakernote::doAddChild
TiffComponent * doAddChild(TiffComponent::UniquePtr tiffComponent) override
Implements addChild(). The default implementation does nothing.
Definition tiffcomposite_int.cpp:573
Exiv2::Internal::TiffImageEntry
A standard TIFF IFD entry consisting of a value which is an array of offsets to image data areas....
Definition tiffcomposite_int.hpp:714
Exiv2::Internal::TiffImageEntry::doEncode
void doEncode(TiffEncoder &encoder, const Exifdatum *datum) override
Implements encode().
Definition tiffcomposite_int.cpp:710
Exiv2::Internal::TiffImageEntry::doWriteImage
size_t doWriteImage(IoWrapper &ioWrapper, ByteOrder byteOrder) const override
Implements writeImage(). Write the image data area to the ioWrapper. Return the number of bytes writt...
Definition tiffcomposite_int.cpp:1221
Exiv2::Internal::TiffImageEntry::doAccept
void doAccept(TiffVisitor &visitor) override
Implements accept().
Definition tiffcomposite_int.cpp:624
Exiv2::Internal::TiffImageEntry::doWriteData
size_t doWriteData(IoWrapper &ioWrapper, ByteOrder byteOrder, size_t offset, size_t dataIdx, size_t &imageIdx) const override
Implements writeData(). Write the image data area to the ioWrapper. Return the number of bytes writte...
Definition tiffcomposite_int.cpp:1127
Exiv2::Internal::TiffImageEntry::doClone
TiffImageEntry * doClone() const override
Internal virtual copy constructor, implements clone().
Definition tiffcomposite_int.cpp:133
Exiv2::Internal::TiffImageEntry::doSizeData
size_t doSizeData() const override
Implements sizeData(). Return the size of the image data area.
Definition tiffcomposite_int.cpp:1358
Exiv2::Internal::TiffImageEntry::doWrite
size_t doWrite(IoWrapper &ioWrapper, ByteOrder byteOrder, size_t offset, size_t valueIdx, size_t dataIdx, size_t &imageIdx) override
Implements write(). Write pointers into the image data area to the ioWrapper. Return the number of by...
Definition tiffcomposite_int.cpp:982
Exiv2::Internal::TiffImageEntry::setStrips
void setStrips(const Value *pSize, const byte *pData, size_t sizeData, size_t baseOffset) override
Set the data areas ("strips").
Definition tiffcomposite_int.cpp:258
Exiv2::Internal::TiffImageEntry::doSize
size_t doSize() const override
Implements size(). Return the size of the strip pointers.
Definition tiffcomposite_int.cpp:1292
Exiv2::Internal::TiffImageEntry::doSizeImage
size_t doSizeImage() const override
Implements sizeImage(). Return the size of the image data area.
Definition tiffcomposite_int.cpp:1416
Exiv2::Internal::TiffMnEntry
This class is the basis for Makernote support in TIFF. It contains a pointer to a concrete Makernote....
Definition tiffcomposite_int.hpp:1006
Exiv2::Internal::TiffMnEntry::doAddPath
TiffComponent * doAddPath(uint16_t tag, TiffPath &tiffPath, TiffComponent *pRoot, TiffComponent::UniquePtr object) override
Implements addPath(). The default implementation does nothing.
Definition tiffcomposite_int.cpp:484
Exiv2::Internal::TiffMnEntry::doAddNext
TiffComponent * doAddNext(TiffComponent::UniquePtr tiffComponent) override
Implements addNext(). The default implementation does nothing.
Definition tiffcomposite_int.cpp:599
Exiv2::Internal::TiffMnEntry::TiffMnEntry
constexpr TiffMnEntry(uint16_t tag, IfdId group, IfdId mnGroup)
Default constructor.
Definition tiffcomposite_int.hpp:1015
Exiv2::Internal::TiffMnEntry::doClone
TiffMnEntry * doClone() const override
Internal virtual copy constructor, implements clone().
Definition tiffcomposite_int.cpp:149
Exiv2::Internal::TiffMnEntry::doAccept
void doAccept(TiffVisitor &visitor) override
Implements accept().
Definition tiffcomposite_int.cpp:656
Exiv2::Internal::TiffMnEntry::doEncode
void doEncode(TiffEncoder &encoder, const Exifdatum *datum) override
Implements encode().
Definition tiffcomposite_int.cpp:714
Exiv2::Internal::TiffMnEntry::doAddChild
TiffComponent * doAddChild(TiffComponent::UniquePtr tiffComponent) override
Implements addChild(). The default implementation does nothing.
Definition tiffcomposite_int.cpp:565
Exiv2::Internal::TiffMnEntry::doSize
size_t doSize() const override
Implements size() by forwarding the call to the actual concrete Makernote, if there is one.
Definition tiffcomposite_int.cpp:1300
Exiv2::Internal::TiffMnEntry::doCount
size_t doCount() const override
Implements count(). Return number of components in the entry.
Definition tiffcomposite_int.cpp:738
Exiv2::Internal::TiffMnEntry::doWrite
size_t doWrite(IoWrapper &ioWrapper, ByteOrder byteOrder, size_t offset, size_t valueIdx, size_t dataIdx, size_t &imageIdx) override
Implements write() by forwarding the call to the actual concrete Makernote, if there is one.
Definition tiffcomposite_int.cpp:1020
Exiv2::Internal::TiffPathItem::group
IfdId group() const
Return the group.
Definition tiffcomposite_int.hpp:82
Exiv2::Internal::TiffPathItem::tag
uint16_t tag() const
Return the tag corresponding to the extended tag.
Definition tiffcomposite_int.hpp:74
Exiv2::Internal::TiffPathItem::extendedTag
uint32_t extendedTag() const
Return the extended tag (32 bit so that it can contain special tags).
Definition tiffcomposite_int.hpp:78
Exiv2::Internal::TiffPathItem::TiffPathItem
constexpr TiffPathItem(uint32_t extendedTag, IfdId group)
Constructor.
Definition tiffcomposite_int.hpp:67
Exiv2::Internal::TiffSizeEntry
A TIFF IFD entry containing the size of a data area of a related TiffDataEntry. This component is use...
Definition tiffcomposite_int.hpp:778
Exiv2::Internal::TiffSizeEntry::dtGroup
IfdId dtGroup() const
Return the group of the related entry which has the data area.
Definition tiffcomposite_int.hpp:796
Exiv2::Internal::TiffSizeEntry::TiffSizeEntry
constexpr TiffSizeEntry(uint16_t tag, IfdId group, uint16_t dtTag, IfdId dtGroup)
Constructor.
Definition tiffcomposite_int.hpp:783
Exiv2::Internal::TiffSizeEntry::dtTag
uint16_t dtTag() const
Return the group of the related entry which has the data area.
Definition tiffcomposite_int.hpp:792
Exiv2::Internal::TiffSizeEntry::doClone
TiffSizeEntry * doClone() const override
Internal virtual copy constructor, implements clone().
Definition tiffcomposite_int.cpp:137
Exiv2::Internal::TiffSizeEntry::doAccept
void doAccept(TiffVisitor &visitor) override
Implements accept().
Definition tiffcomposite_int.cpp:628
Exiv2::Internal::TiffSizeEntry::doEncode
void doEncode(TiffEncoder &encoder, const Exifdatum *datum) override
Implements encode().
Definition tiffcomposite_int.cpp:718
Exiv2::Internal::TiffSubIfd::doSizeImage
size_t doSizeImage() const override
Implements sizeImage(). Return the sum of the image sizes of all sub-IFDs.
Definition tiffcomposite_int.cpp:1400
Exiv2::Internal::TiffSubIfd::doWrite
size_t doWrite(IoWrapper &ioWrapper, ByteOrder byteOrder, size_t offset, size_t valueIdx, size_t dataIdx, size_t &imageIdx) override
Implements write(). Write the sub-IFD pointers to the ioWrapper, return the number of bytes written....
Definition tiffcomposite_int.cpp:1006
Exiv2::Internal::TiffSubIfd::doClone
TiffSubIfd * doClone() const override
Internal virtual copy constructor, implements clone().
Definition tiffcomposite_int.cpp:145
Exiv2::Internal::TiffSubIfd::doWriteData
size_t doWriteData(IoWrapper &ioWrapper, ByteOrder byteOrder, size_t offset, size_t dataIdx, size_t &imageIdx) const override
Implements writeData(). Write the sub-IFDs to the ioWrapper. Return the number of bytes written.
Definition tiffcomposite_int.cpp:1153
Exiv2::Internal::TiffSubIfd::doWriteImage
size_t doWriteImage(IoWrapper &ioWrapper, ByteOrder byteOrder) const override
Implements writeImage(). Write the image data of each sub-IFD to the ioWrapper. Return the number of ...
Definition tiffcomposite_int.cpp:1205
Exiv2::Internal::TiffSubIfd::doSizeData
size_t doSizeData() const override
Implements sizeData(). Return the sum of the sizes of all sub-IFDs.
Definition tiffcomposite_int.cpp:1373
Exiv2::Internal::TiffSubIfd::doAddPath
TiffComponent * doAddPath(uint16_t tag, TiffPath &tiffPath, TiffComponent *pRoot, TiffComponent::UniquePtr object) override
Implements addPath(). The default implementation does nothing.
Definition tiffcomposite_int.cpp:457
Exiv2::Internal::TiffSubIfd::~TiffSubIfd
~TiffSubIfd() override=default
Virtual destructor.
Exiv2::Internal::TiffSubIfd::TiffSubIfd
TiffSubIfd(uint16_t tag, IfdId group, IfdId newGroup)
Default constructor.
Definition tiffcomposite_int.cpp:65
Exiv2::Internal::TiffSubIfd::doSize
size_t doSize() const override
Implements size(). Return the size of the sub-Ifd pointers.
Definition tiffcomposite_int.cpp:1296
Exiv2::Internal::TiffSubIfd::doAddChild
TiffComponent * doAddChild(TiffComponent::UniquePtr tiffComponent) override
Implements addChild(). The default implementation does nothing.
Definition tiffcomposite_int.cpp:555
Exiv2::Internal::TiffSubIfd::doEncode
void doEncode(TiffEncoder &encoder, const Exifdatum *datum) override
Implements encode().
Definition tiffcomposite_int.cpp:722
Exiv2::Internal::TiffSubIfd::doAccept
void doAccept(TiffVisitor &visitor) override
Implements accept().
Definition tiffcomposite_int.cpp:647
Exiv2::Internal::TiffVisitor
Abstract base class defining the interface for TIFF composite visitors (Visitor pattern).
Definition tiffvisitor_int.hpp:39
Exiv2::Value
Common interface for all types of values used with metadata.
Definition value.hpp:33
Exiv2::Value::UniquePtr
std::unique_ptr< Value > UniquePtr
Shortcut for a Value auto pointer.
Definition value.hpp:36
Exiv2::Internal::Tag
Definition tiffcomposite_int.hpp:46
Exiv2::Internal::Tag::cmt2
const uint32_t cmt2
Special tag: root IFD of CR3 images.
Definition tiffcomposite_int.hpp:53
Exiv2::Internal::Tag::fuji
const uint32_t fuji
Special tag: root IFD of Fujifilm RAF images.
Definition tiffcomposite_int.hpp:52
Exiv2::Internal::Tag::none
const uint32_t none
Dummy tag.
Definition tiffcomposite_int.hpp:47
Exiv2::Internal::Tag::cmt4
const uint32_t cmt4
Special tag: root IFD of CR3 images.
Definition tiffcomposite_int.hpp:55
Exiv2::Internal::Tag::pana
const uint32_t pana
Special tag: root IFD of Panasonic RAW images.
Definition tiffcomposite_int.hpp:51
Exiv2::Internal::Tag::root
const uint32_t root
Special tag: root IFD.
Definition tiffcomposite_int.hpp:48
Exiv2::Internal::Tag::cmt3
const uint32_t cmt3
Special tag: root IFD of CR3 images.
Definition tiffcomposite_int.hpp:54
Exiv2::Internal::Tag::all
const uint32_t all
Special tag: all tags in a group.
Definition tiffcomposite_int.hpp:50
Exiv2::Internal::Tag::next
const uint32_t next
Special tag: next IFD.
Definition tiffcomposite_int.hpp:49
Exiv2::Internal
Helper structure for the Matroska tags lookup table.
Definition matroskavideo.hpp:39
Exiv2::Internal::cmpGroupLt
bool cmpGroupLt(const std::unique_ptr< TiffDirectory > &lhs, const std::unique_ptr< TiffDirectory > &rhs)
Compare two TIFF component pointers by group. Return true if the group of component lhs is less than ...
Definition tiffcomposite_int.cpp:1482
Exiv2::Internal::ttTiffFloat
const TiffType ttTiffFloat
TIFF FLOAT type.
Definition tiffcomposite_int.hpp:34
Exiv2::Internal::TiffPath
std::stack< TiffPathItem > TiffPath
Stack to hold a path from the TIFF root element to a TIFF entry.
Definition tifffwd_int.hpp:77
Exiv2::Internal::newTiffThumbSize
TiffComponent::UniquePtr newTiffThumbSize(uint16_t tag, IfdId group)
Function to create and initialize a new TIFF entry for a thumbnail (size).
Definition tiffcomposite_int.hpp:1528
Exiv2::Internal::ttUnsignedLong
const TiffType ttUnsignedLong
Exif LONG type.
Definition tiffcomposite_int.hpp:27
Exiv2::Internal::ttSignedByte
const TiffType ttSignedByte
Exif SBYTE type.
Definition tiffcomposite_int.hpp:29
Exiv2::Internal::CryptFct
DataBuf(*)(uint16_t, const byte *, size_t, TiffComponent *) CryptFct
Function pointer type for a crypt function used for binary arrays.
Definition tiffcomposite_int.hpp:1215
Exiv2::Internal::ttUnsignedRational
const TiffType ttUnsignedRational
Exif RATIONAL type.
Definition tiffcomposite_int.hpp:28
Exiv2::Internal::ttTiffDouble
const TiffType ttTiffDouble
TIFF DOUBLE type.
Definition tiffcomposite_int.hpp:35
Exiv2::Internal::newTiffEntry
TiffComponent::UniquePtr newTiffEntry(uint16_t tag, IfdId group)
Function to create and initialize a new TIFF entry.
Definition tiffcomposite_int.cpp:1486
Exiv2::Internal::newTiffBinaryArray0
TiffComponent::UniquePtr newTiffBinaryArray0(uint16_t tag, IfdId group)
Function to create and initialize a new binary array entry.
Definition tiffcomposite_int.hpp:1504
Exiv2::Internal::newTiffDirectory
TiffComponent::UniquePtr newTiffDirectory(uint16_t tag, IfdId)
Function to create and initialize a new TIFF directory.
Definition tiffcomposite_int.hpp:1492
Exiv2::Internal::newTiffMnEntry
TiffComponent::UniquePtr newTiffMnEntry(uint16_t tag, IfdId group)
Function to create and initialize a new TIFF makernote entry.
Definition tiffcomposite_int.cpp:1490
Exiv2::Internal::newTiffSubIfd
TiffComponent::UniquePtr newTiffSubIfd(uint16_t tag, IfdId group)
Function to create and initialize a new TIFF sub-directory.
Definition tiffcomposite_int.hpp:1498
Exiv2::Internal::ttTiffIfd
const TiffType ttTiffIfd
TIFF IFD type.
Definition tiffcomposite_int.hpp:36
Exiv2::Internal::ttSignedShort
const TiffType ttSignedShort
Exif SSHORT type.
Definition tiffcomposite_int.hpp:31
Exiv2::Internal::TiffType
uint16_t TiffType
TIFF value type.
Definition tiffcomposite_int.hpp:22
Exiv2::Internal::newTiffImageData
TiffComponent::UniquePtr newTiffImageData(uint16_t tag, IfdId group)
Function to create and initialize a new TIFF entry for image data.
Definition tiffcomposite_int.hpp:1534
Exiv2::Internal::EncoderFct
void(TiffEncoder::*)(TiffEntryBase *, const Exifdatum *) EncoderFct
Function pointer type for a TiffDecoder member function to decode a TIFF component.
Definition tifffwd_int.hpp:60
Exiv2::Internal::ttAsciiString
const TiffType ttAsciiString
Exif ASCII type.
Definition tiffcomposite_int.hpp:25
Exiv2::Internal::ttUnsignedShort
const TiffType ttUnsignedShort
Exif SHORT type.
Definition tiffcomposite_int.hpp:26
Exiv2::Internal::ttSignedLong
const TiffType ttSignedLong
Exif SLONG type.
Definition tiffcomposite_int.hpp:32
Exiv2::Internal::newTiffBinaryArray1
TiffComponent::UniquePtr newTiffBinaryArray1(uint16_t tag, IfdId group)
Function to create and initialize a new simple binary array entry.
Definition tiffcomposite_int.hpp:1510
Exiv2::Internal::newTiffBinaryArray2
TiffComponent::UniquePtr newTiffBinaryArray2(uint16_t tag, IfdId group)
Function to create and initialize a new complex binary array entry.
Definition tiffcomposite_int.hpp:1516
Exiv2::Internal::ttUnsignedByte
const TiffType ttUnsignedByte
Exif BYTE type.
Definition tiffcomposite_int.hpp:24
Exiv2::Internal::DecoderFct
void(TiffDecoder::*)(const TiffEntryBase *) DecoderFct
Function pointer type for a TiffDecoder member function to decode a TIFF component.
Definition tifffwd_int.hpp:55
Exiv2::Internal::newTiffThumbData
TiffComponent::UniquePtr newTiffThumbData(uint16_t tag, IfdId group)
Function to create and initialize a new TIFF entry for a thumbnail (data).
Definition tiffcomposite_int.hpp:1522
Exiv2::Internal::toTypeId
TypeId toTypeId(TiffType tiffType, uint16_t tag, IfdId group)
Convert the tiffType of a tag and group to an Exiv2 typeId.
Definition tiffcomposite_int.cpp:1448
Exiv2::Internal::toTiffType
TiffType toTiffType(TypeId typeId)
Convert the Exiv2 typeId to a TIFF value type.
Definition tiffcomposite_int.cpp:1465
Exiv2::Internal::CfgSelFct
int(*)(uint16_t, const byte *, size_t, TiffComponent *) CfgSelFct
Function pointer type for a function to determine which cfg + def of a corresponding array set to use...
Definition tiffcomposite_int.hpp:1212
Exiv2::Internal::ttUndefined
const TiffType ttUndefined
Exif UNDEFINED type.
Definition tiffcomposite_int.hpp:30
Exiv2::Internal::newTiffBinaryElement
TiffComponent::UniquePtr newTiffBinaryElement(uint16_t tag, IfdId group)
Function to create and initialize a new binary array element.
Definition tiffcomposite_int.cpp:1494
Exiv2::Internal::newTiffImageSize
TiffComponent::UniquePtr newTiffImageSize(uint16_t tag, IfdId group)
Function to create and initialize a new TIFF entry for image data (size).
Definition tiffcomposite_int.hpp:1540
Exiv2::Internal::ttSignedRational
const TiffType ttSignedRational
Exif SRATIONAL type.
Definition tiffcomposite_int.hpp:33
Exiv2
Class CrwImage to access Canon CRW images. References: The Canon RAW (CRW) File Format by Phil Harv...
Definition asfvideo.hpp:15
Exiv2::IfdId
IfdId
Type to specify the IFD to which a metadata belongs.
Definition tags.hpp:34
Exiv2::TypeId
TypeId
Exiv2 value type identifiers.
Definition types.hpp:70
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
Exiv2::Internal::ArrayCfg
Additional configuration for a binary array.
Definition tiffcomposite_int.hpp:1232
Exiv2::Internal::ArrayCfg::hasSize_
bool hasSize_
If true, first tag is the size element.
Definition tiffcomposite_int.hpp:1245
Exiv2::Internal::ArrayCfg::elDefaultDef_
ArrayDef elDefaultDef_
Default element.
Definition tiffcomposite_int.hpp:1248
Exiv2::Internal::ArrayCfg::concat_
bool concat_
If true, concatenate gaps between defined tags to single tags.
Definition tiffcomposite_int.hpp:1247
Exiv2::Internal::ArrayCfg::cryptFct_
CryptFct cryptFct_
Crypt function, 0 if not used.
Definition tiffcomposite_int.hpp:1244
Exiv2::Internal::ArrayCfg::elTiffType_
TiffType elTiffType_
Type for the array entry and the size element, if any.
Definition tiffcomposite_int.hpp:1243
Exiv2::Internal::ArrayCfg::byteOrder_
ByteOrder byteOrder_
Byte order, invalidByteOrder to inherit.
Definition tiffcomposite_int.hpp:1242
Exiv2::Internal::ArrayCfg::tagStep
size_t tagStep() const
Return the size of the default tag, which is used to calculate tag numbers as idx/tagStep.
Definition tiffcomposite_int.hpp:1237
Exiv2::Internal::ArrayCfg::group_
IfdId group_
Group for the elements.
Definition tiffcomposite_int.hpp:1241
Exiv2::Internal::ArrayCfg::hasFillers_
bool hasFillers_
If true, write all defined tags.
Definition tiffcomposite_int.hpp:1246
Exiv2::Internal::ArrayDef
Defines one tag in a binary array.
Definition tiffcomposite_int.hpp:1218
Exiv2::Internal::ArrayDef::count_
size_t count_
Number of components.
Definition tiffcomposite_int.hpp:1228
Exiv2::Internal::ArrayDef::operator==
bool operator==(size_t idx) const
Comparison with idx.
Definition tiffcomposite_int.hpp:1220
Exiv2::Internal::ArrayDef::idx_
size_t idx_
Index in bytes from the start.
Definition tiffcomposite_int.hpp:1226
Exiv2::Internal::ArrayDef::tiffType_
TiffType tiffType_
TIFF type of the element.
Definition tiffcomposite_int.hpp:1227
Exiv2::Internal::ArrayDef::size
size_t size(uint16_t tag, IfdId group) const
Get the size in bytes of a tag.
Definition tiffcomposite_int.cpp:336
Exiv2::Internal::ArraySet
Combination of array configuration and definition for arrays.
Definition tiffcomposite_int.hpp:1252
Exiv2::Internal::ArraySet::def_
const ArrayDef * def_
Binary array definition array.
Definition tiffcomposite_int.hpp:1254
Exiv2::Internal::ArraySet::cfg_
ArrayCfg cfg_
Binary array configuration.
Definition tiffcomposite_int.hpp:1253
Exiv2::Internal::ArraySet::defSize_
size_t defSize_
Size of the array definition array.
Definition tiffcomposite_int.hpp:1255
Exiv2::Internal::TiffMappingInfo::Key
Search key for TIFF mapping structures.
Definition tiffcomposite_int.hpp:368
Exiv2::Internal::TiffMappingInfo::Key::m_
std::string m_
Camera make.
Definition tiffcomposite_int.hpp:369
Exiv2::Internal::TiffMappingInfo::Key::e_
uint32_t e_
Extended tag.
Definition tiffcomposite_int.hpp:370
Exiv2::Internal::TiffMappingInfo::Key::g_
IfdId g_
Group
Definition tiffcomposite_int.hpp:371
Exiv2::Internal::TiffMappingInfo
TIFF mapping table for functions to decode special cases.
Definition tiffcomposite_int.hpp:342
Exiv2::Internal::TiffMappingInfo::group_
IfdId group_
Group that contains the tag.
Definition tiffcomposite_int.hpp:361
Exiv2::Internal::TiffMappingInfo::make_
const char * make_
Camera make for which these mapping functions apply.
Definition tiffcomposite_int.hpp:359
Exiv2::Internal::TiffMappingInfo::tag
uint16_t tag() const
Return the tag corresponding to the extended tag.
Definition tiffcomposite_int.hpp:354
Exiv2::Internal::TiffMappingInfo::operator==
bool operator==(const Key &key) const
Compare a TiffMappingInfo with a TiffMappingInfo::Key. The two are equal if TiffMappingInfo::make_ eq...
Definition tiffcomposite_int.cpp:27
Exiv2::Internal::TiffMappingInfo::extendedTag_
uint32_t extendedTag_
Tag (32 bit so that it can contain special tags).
Definition tiffcomposite_int.hpp:360
Exiv2::Internal::TiffMappingInfo::decoderFct_
DecoderFct decoderFct_
Decoder function for matching tags.
Definition tiffcomposite_int.hpp:362
Exiv2::Internal::TiffMappingInfo::encoderFct_
EncoderFct encoderFct_
Encoder function for matching tags.
Definition tiffcomposite_int.hpp:363