 |
Exiv2
|
20 #ifndef TIFFCOMPOSITE_INT_HPP_
21 #define TIFFCOMPOSITE_INT_HPP_
26 #include "tifffwd_int.hpp"
72 const uint32_t
none = 0x10000;
73 const uint32_t
root = 0x20000;
74 const uint32_t
next = 0x30000;
75 const uint32_t
all = 0x40000;
76 const uint32_t
pana = 0x80000;
77 const uint32_t
fuji = 0x100000;
78 const uint32_t
cmt2 = 0x110000;
79 const uint32_t
cmt3 = 0x120000;
80 const uint32_t
cmt4 = 0x130000;
98 uint16_t
tag()
const {
return static_cast<uint16_t
>(extendedTag_ & 0xffff); }
108 uint32_t extendedTag_;
142 long write(
const byte* pData,
long wcount);
157 const byte* pHeader_;
229 void setStart(
const byte* pStart) { pStart_ =
const_cast<byte*
>(pStart); }
254 uint16_t
tag()
const {
return tag_; }
259 byte*
start()
const {
return pStart_; }
275 uint32_t& imageIdx)
const;
287 uint32_t
size()
const;
291 uint32_t
count()
const;
311 virtual int idx()
const;
334 uint32_t& imageIdx) =0;
346 uint32_t& imageIdx)
const =0;
351 virtual uint32_t
doSize()
const =0;
353 virtual uint32_t
doCount()
const =0;
462 int32_t
offset()
const {
return offset_; }
466 virtual int idx()
const;
471 const byte*
pData()
const {
return pData_; }
506 virtual uint32_t
doCount()
const;
516 uint32_t& imageIdx)
const;
524 virtual uint32_t
doSize()
const;
621 uint32_t baseOffset) =0;
626 uint16_t
szTag()
const {
return szTag_; }
634 const uint16_t szTag_;
635 const IfdId szGroup_;
658 pDataArea_(0), sizeDataArea_(0) {}
668 uint32_t baseOffset);
706 uint32_t& imageIdx)
const;
717 uint32_t sizeDataArea_;
750 uint32_t baseOffset);
786 uint32_t& imageIdx)
const;
794 virtual uint32_t
doSize()
const;
803 typedef std::vector<std::pair<const byte*, uint32_t> > Strips;
829 uint16_t
dtTag()
const {
return dtTag_; }
849 const uint16_t dtTag_;
850 const IfdId dtGroup_;
873 bool hasNext()
const {
return hasNext_; }
917 uint32_t& imageIdx)
const;
930 virtual uint32_t
doSize()
const;
935 virtual uint32_t
doCount()
const;
957 uint32_t writeDirEntry(
IoWrapper& ioWrapper,
964 uint32_t& imageIdx)
const;
1019 uint32_t& imageIdx);
1033 uint32_t& imageIdx)
const;
1056 typedef std::vector<TiffDirectory*> Ifds;
1104 uint32_t& imageIdx);
1111 virtual uint32_t
doCount()
const;
1118 virtual uint32_t
doSize()
const;
1157 bool hasNext =
true);
1236 uint32_t& imageIdx);
1250 uint32_t& imageIdx)
const;
1261 virtual uint32_t
doSize()
const;
1267 virtual uint32_t
doCount()
const;
1317 uint32_t
size(uint16_t tag,
IfdId group)
const;
1451 uint32_t& imageIdx);
1458 virtual uint32_t
doCount()
const;
1464 virtual uint32_t
doSize()
const;
1540 uint32_t& imageIdx);
1549 virtual uint32_t
doCount()
const;
1556 virtual uint32_t
doSize()
const;
1593 template<IfdId newGroup>
1600 template<IfdId newGroup>
1607 template<const ArrayCfg* arrayCfg,
int N, const ArrayDef (&arrayDef)[N]>
1616 template<const ArrayCfg* arrayCfg>
1624 template<const ArraySet* arraySet,
int N, CfgSelFct cfgSelFct>
1632 template<u
int16_t szTag, IfdId szGroup>
1640 template<u
int16_t dtTag, IfdId dtGroup>
1648 template<u
int16_t szTag, IfdId szGroup>
1656 template<u
int16_t dtTag, IfdId dtGroup>
1666 #endif // #ifndef TIFFCOMPOSITE_INT_HPP_
int putb(byte data)
Wraps the corresponding BasicIo::putb() method.
Definition: tiffcomposite_int.cpp:74
uint32_t writeData(IoWrapper &ioWrapper, ByteOrder byteOrder, int32_t offset, uint32_t dataIdx, uint32_t &imageIdx) const
Write the IFD data of this component to a binary image. Return the number of bytes written....
Definition: tiffcomposite_int.cpp:1477
void accept(TiffVisitor &visitor)
Interface to accept visitors (Visitor pattern). Visitors can perform operations on all components of ...
Definition: tiffcomposite_int.cpp:883
void updateValue(Value::AutoPtr value, ByteOrder byteOrder)
Update the value. Takes ownership of the pointer passed in.
Definition: tiffcomposite_int.cpp:372
Interface for a standard TIFF IFD entry consisting of a value which is a set of offsets to a data are...
Definition: tiffcomposite_int.hpp:595
virtual uint32_t doWrite(IoWrapper &ioWrapper, ByteOrder byteOrder, int32_t offset, uint32_t valueIdx, uint32_t dataIdx, uint32_t &imageIdx)
Implements write(). Write pointers into the image data area to the ioWrapper. Return the number of by...
Definition: tiffcomposite_int.cpp:1315
virtual void doAccept(TiffVisitor &visitor)
Implements accept().
Definition: tiffcomposite_int.cpp:948
uint32_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:1666
uint16_t tag() const
Return the tag of this entry.
Definition: tiffcomposite_int.hpp:255
uint32_t addElement(uint32_t idx, const ArrayDef &def)
Add an element to the binary array, return the size of the element.
Definition: tiffcomposite_int.cpp:610
TiffType tiffType_
TIFF type of the element.
Definition: tiffcomposite_int.hpp:1320
virtual ~TiffMnEntry()
Virtual destructor.
Definition: tiffcomposite_int.cpp:222
virtual void visitIfdMakernote(TiffIfdMakernote *object)=0
Operation to perform for an IFD makernote.
bool hasFillers_
If true, write all defined tags.
Definition: tiffcomposite_int.hpp:1337
Provides binary IO on blocks of memory by implementing the BasicIo interface. A copy-on-write impleme...
Definition: basicio.hpp:540
virtual uint32_t doSizeData() const
This class does not really implement sizeData(), it only has size(). This method must not be called; ...
Definition: tiffcomposite_int.cpp:1765
TiffType tiffType() const
Return the TIFF type.
Definition: tiffcomposite_int.hpp:457
virtual TiffComponent * doAddNext(AutoPtr tiffComponent)
Implements addNext(). The default implementation does nothing.
Definition: tiffcomposite_int.cpp:854
virtual uint32_t doWrite(IoWrapper &ioWrapper, ByteOrder byteOrder, int32_t offset, uint32_t valueIdx, uint32_t dataIdx, uint32_t &imageIdx)
Implements write(). Write the sub-IFD pointers to the ioWrapper, return the number of bytes written....
Definition: tiffcomposite_int.cpp:1347
virtual TiffComponent * doAddChild(TiffComponent::AutoPtr tiffComponent)
Implements addChild(). The default implementation does nothing.
Definition: tiffcomposite_int.cpp:827
uint32_t ifdOffset() const
Return the offset to the start of the Makernote IFD from the start of the Makernote....
Definition: tiffcomposite_int.cpp:509
TiffComponent::AutoPtr newTiffThumbSize(uint16_t tag, IfdId group)
Function to create and initialize a new TIFF entry for a thumbnail (size)
Definition: tiffcomposite_int.hpp:1641
virtual void visitSubIfd(TiffSubIfd *object)=0
Operation to perform for a TIFF sub-IFD.
void setCount(uint32_t count)
Set the number of components in this entry.
Definition: tiffcomposite_int.hpp:488
virtual void visitSizeEntry(TiffSizeEntry *object)=0
Operation to perform for a TIFF size entry.
const uint32_t fuji
Special tag: root IFD of Fujifilm RAF images.
Definition: tiffcomposite_int.hpp:77
void encodeDataEntry(TiffDataEntry *object, const Exifdatum *datum)
Callback encoder function for a data entry.
Definition: tiffvisitor_int.cpp:960
virtual uint32_t doSizeImage() const
Implements sizeImage(). Return the total image data size of the makernote IFD.
Definition: tiffcomposite_int.cpp:1833
byte * pData_
Pointer to the buffer, 0 if none has been allocated.
Definition: types.hpp:258
void encodeMnEntry(TiffMnEntry *object, const Exifdatum *datum)
Callback encoder function for a Makernote entry.
Definition: tiffvisitor_int.cpp:1071
int(* CfgSelFct)(uint16_t, const byte *, uint32_t, TiffComponent *const)
Function pointer type for a function to determine which cfg + def of a corresponding array set to use...
Definition: tiffcomposite_int.hpp:1307
const uint32_t cmt4
Special tag: root IFD of CR3 images.
Definition: tiffcomposite_int.hpp:80
virtual TiffComponent * doAddChild(TiffComponent::AutoPtr tiffComponent)
Implements addChild(). Todo: Document it!
Definition: tiffcomposite_int.cpp:841
bool cmpGroupLt(TiffComponent const *lhs, TiffComponent const *rhs)
Compare two TIFF component pointers by group. Return true if the group of component lhs is less than ...
Definition: tiffcomposite_int.cpp:1914
const uint32_t cmt3
Special tag: root IFD of CR3 images.
Definition: tiffcomposite_int.hpp:79
virtual TiffComponent * doAddPath(uint16_t tag, TiffPath &tiffPath, TiffComponent *const pRoot, TiffComponent::AutoPtr object)
Implements addPath(). The default implementation does nothing.
Definition: tiffcomposite_int.cpp:635
virtual TiffMnEntry * doClone() const
Internal virtual copy constructor, implements clone().
Definition: tiffcomposite_int.cpp:323
virtual TiffComponent * doAddPath(uint16_t tag, TiffPath &tiffPath, TiffComponent *const pRoot, TiffComponent::AutoPtr object)
Implements addPath(). The default implementation does nothing.
Definition: tiffcomposite_int.cpp:730
ByteOrder imageByteOrder() const
Return the byte order used for the image.
Definition: tiffcomposite_int.hpp:1207
TiffComponent::AutoPtr newTiffBinaryArray2(uint16_t tag, IfdId group)
Function to create and initialize a new complex binary array entry.
Definition: tiffcomposite_int.hpp:1625
TiffIfdMakernote(uint16_t tag, IfdId group, IfdId mnGroup, MnHeader *pHeader, bool hasNext=true)
Default constructor.
Definition: tiffcomposite_int.cpp:111
virtual ~TiffSizeEntry()
Virtual destructor.
Definition: tiffcomposite_int.cpp:218
virtual uint32_t doSize() const
Implements size(). Todo: Document it!
Definition: tiffcomposite_int.cpp:1726
void setImageByteOrder(ByteOrder byteOrder)
Set the byte order used for the image.
Definition: tiffcomposite_int.hpp:1177
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:229
This abstract base class provides the common functionality of an IFD directory entry and defines an e...
Definition: tiffcomposite_int.hpp:411
virtual long size() const =0
Return the size of the value in bytes.
TiffComponent * addPath(uint16_t tag, TiffPath &tiffPath, TiffComponent *const pRoot, AutoPtr object=AutoPtr(0))
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:627
Common interface for all types of values used with metadata.
Definition: value.hpp:51
uint16_t dtTag() const
Return the group of the related entry which has the data area.
Definition: tiffcomposite_int.hpp:830
Abstract base class defining the interface for TIFF composite visitors (Visitor pattern)
Definition: tiffvisitor_int.hpp:65
virtual uint32_t doSizeData() const
This class does not really implement sizeData(), it only has size(). This method must not be called; ...
Definition: tiffcomposite_int.cpp:1801
void(TiffDecoder::* DecoderFct)(const TiffEntryBase *)
Function pointer type for a TiffDecoder member function to decode a TIFF component.
Definition: tifffwd_int.hpp:76
TiffMnEntry(uint16_t tag, IfdId group, IfdId mnGroup)
Default constructor.
Definition: tiffcomposite_int.cpp:106
virtual ~TiffComponent()
Virtual destructor.
Definition: tiffcomposite_int.cpp:175
TiffBinaryElement(uint16_t tag, IfdId group)
Constructor.
Definition: tiffcomposite_int.cpp:166
@ cr2RawIfdOffset
CR2 RAW IFD offset, a pointer in the CR2 header to the 4th IFD in a CR2 image.
Definition: tiffimage_int.hpp:423
TIFF composite visitor to encode metadata from an image to the TIFF tree. The metadata containers and...
Definition: tiffvisitor_int.hpp:376
virtual uint32_t doSizeImage() const =0
Implements sizeImage().
virtual uint32_t doSize() const
Implements size(). Return the size of the strip pointers.
Definition: tiffcomposite_int.cpp:1703
std::stack< TiffPathItem > TiffPath
Stack to hold a path from the TIFF root element to a TIFF entry.
Definition: tifffwd_int.hpp:104
virtual uint32_t doWriteData(IoWrapper &ioWrapper, ByteOrder byteOrder, int32_t offset, uint32_t dataIdx, uint32_t &imageIdx) const
This class does not really implement writeData(), it only has write(). This method must not be called...
Definition: tiffcomposite_int.cpp:1486
void(TiffEncoder::* EncoderFct)(TiffEntryBase *, const Exifdatum *)
Function pointer type for a TiffDecoder member function to decode a TIFF component.
Definition: tifffwd_int.hpp:81
An Exif metadatum, consisting of an ExifKey and a Value and methods to manipulate these.
Definition: exif.hpp:59
TiffComponent::AutoPtr newTiffMnEntry(uint16_t tag, IfdId group)
Function to create and initialize a new TIFF makernote entry.
Definition: tiffcomposite_int.cpp:1926
void encodeSizeEntry(TiffSizeEntry *object, const Exifdatum *datum)
Callback encoder function for a size entry.
Definition: tiffvisitor_int.cpp:1077
Element of a TiffBinaryArray.
Definition: tiffcomposite_int.hpp:1493
IfdId
Type to specify the IFD to which a metadata belongs.
Definition: tags_int.hpp:46
virtual void setStrips(const Value *pSize, const byte *pData, uint32_t sizeData, uint32_t baseOffset)
Set the data areas ("strips").
Definition: tiffcomposite_int.cpp:463
void setDecoded(bool decoded)
Set a flag to indicate if the array was decoded.
Definition: tiffcomposite_int.hpp:1406
Combination of array configuration and definition for arrays.
Definition: tiffcomposite_int.hpp:1343
void setData(byte *pData, int32_t size)
Set pointer and size of the entry's data (not taking ownership of the data).
Definition: tiffcomposite_int.cpp:362
IfdId g_
Group
Definition: tiffcomposite_int.hpp:402
virtual uint32_t doSizeData() const
Implements sizeData(). Return the size of the data area.
Definition: tiffcomposite_int.cpp:1786
bool go(GoEvent event) const
Check if stop flag for event is clear, return true if it's clear.
Definition: tiffvisitor_int.cpp:98
@ undefined
Exif UNDEFINED type, an 8-bit byte that may contain anything.
Definition: types.hpp:126
IfdId group_
Group for the elements.
Definition: tiffcomposite_int.hpp:1332
void setValue(Value::AutoPtr value)
Set tag value. Takes ownership of the pointer passed in.
Definition: tiffcomposite_int.cpp:387
virtual TiffSizeEntry * doClone() const
Internal virtual copy constructor, implements clone().
Definition: tiffcomposite_int.cpp:308
TiffComponent::AutoPtr newTiffImageData(uint16_t tag, IfdId group)
Function to create and initialize a new TIFF entry for image data.
Definition: tiffcomposite_int.hpp:1649
virtual TiffComponent * doAddNext(TiffComponent::AutoPtr tiffComponent)
Implements addNext(). The default implementation does nothing.
Definition: tiffcomposite_int.cpp:878
void encodeSubIfd(TiffSubIfd *object, const Exifdatum *datum)
Callback encoder function for a sub-IFD entry.
Definition: tiffvisitor_int.cpp:1082
virtual void visitBinaryArray(TiffBinaryArray *object)=0
Operation to perform for a binary array.
uint32_t count() const
Return the number of components in this component.
Definition: tiffcomposite_int.cpp:1008
virtual void doAccept(TiffVisitor &visitor)
Implements accept().
Definition: tiffcomposite_int.cpp:908
void encodeImageEntry(TiffImageEntry *object, const Exifdatum *datum)
Callback encoder function for an image entry.
Definition: tiffvisitor_int.cpp:999
EXV_WARN_UNUSED_RESULT std::pair< byte *, long > release()
Release ownership of the buffer to the caller. Returns the buffer as a data pointer and size pair,...
Definition: types.cpp:167
const TiffType ttTiffIfd
TIFF IFD type.
Definition: tiffcomposite_int.hpp:61
void setByteOrder(ByteOrder byteOrder)
Set the byte order for the makernote.
Definition: tiffcomposite_int.cpp:543
@ comment
Exiv2 type for the Exif user comment.
Definition: types.hpp:139
virtual void visitMnEntry(TiffMnEntry *object)=0
Operation to perform for the makernote component.
TiffBinaryArray(uint16_t tag, IfdId group, const ArrayCfg *arrayCfg, const ArrayDef *arrayDef, int defSize)
Constructor.
Definition: tiffcomposite_int.cpp:124
virtual int seek(long offset, Position pos)
Move the current IO position.
Definition: basicio.cpp:1314
@ geTraverse
Signal to control traversing of the composite tree.
Definition: tiffvisitor_int.hpp:70
A standard TIFF IFD entry.
Definition: tiffcomposite_int.hpp:563
TiffSubIfd(uint16_t tag, IfdId group, IfdId newGroup)
Default constructor.
Definition: tiffcomposite_int.cpp:101
Interface class for components of a TIFF directory hierarchy (Composite pattern). Both TIFF directori...
Definition: tiffcomposite_int.hpp:171
const ArrayDef * def() const
Return a pointer to the definition.
Definition: tiffcomposite_int.hpp:1414
bool hasSize_
If true, first tag is the size element.
Definition: tiffcomposite_int.hpp:1336
virtual uint32_t doWriteImage(IoWrapper &ioWrapper, ByteOrder byteOrder) const
Implements writeImage(). Write the image data of each sub-IFD to the ioWrapper. Return the number of ...
Definition: tiffcomposite_int.cpp:1605
virtual uint32_t doWriteData(IoWrapper &ioWrapper, ByteOrder byteOrder, int32_t offset, uint32_t dataIdx, uint32_t &imageIdx) const =0
Implements writeData().
virtual ~TiffEntry()
Virtual destructor.
Definition: tiffcomposite_int.cpp:202
This class is the basis for Makernote support in TIFF. It contains a pointer to a concrete Makernote....
Definition: tiffcomposite_int.hpp:1071
virtual TiffBinaryArray * doClone() const
Internal virtual copy constructor, implements clone().
Definition: tiffcomposite_int.cpp:335
bool updOrigDataBuf(const byte *pData, uint32_t size)
Update the original data buffer and its size, return true if successful.
Definition: tiffcomposite_int.cpp:600
const uint32_t cmt2
Special tag: root IFD of CR3 images.
Definition: tiffcomposite_int.hpp:78
virtual uint32_t doWrite(IoWrapper &ioWrapper, ByteOrder byteOrder, int32_t offset, uint32_t valueIdx, uint32_t dataIdx, uint32_t &imageIdx)
Implements write(). Write the Makernote header, TIFF directory, values and additional data to the ioW...
Definition: tiffcomposite_int.cpp:1379
virtual uint32_t doCount() const
Implements count(). Returns the count from the element definition.
Definition: tiffcomposite_int.cpp:1068
Search key for TIFF mapping structures.
Definition: tiffcomposite_int.hpp:397
const TiffType ttSignedRational
Exif SRATIONAL type.
Definition: tiffcomposite_int.hpp:58
virtual long count() const =0
Return the number of components of the value.
virtual TiffComponent * doAddPath(uint16_t tag, TiffPath &tiffPath, TiffComponent *const pRoot, TiffComponent::AutoPtr object)
Implements addPath(). Todo: Document it!
Definition: tiffcomposite_int.cpp:760
const uint32_t none
Dummy tag.
Definition: tiffcomposite_int.hpp:72
uint32_t idx_
Index in bytes from the start.
Definition: tiffcomposite_int.hpp:1319
virtual uint32_t doSizeImage() const
Implements sizeImage(). Return the sum of the image sizes of all sub-IFDs.
Definition: tiffcomposite_int.cpp:1824
virtual TiffEntry * doClone() const
Internal virtual copy constructor, implements clone().
Definition: tiffcomposite_int.cpp:293
virtual uint32_t doCount() const
Implements count().
Definition: tiffcomposite_int.cpp:1018
virtual ~TiffEntryBase()
Virtual destructor.
Definition: tiffcomposite_int.cpp:194
const TiffType ttUnsignedRational
Exif RATIONAL type.
Definition: tiffcomposite_int.hpp:53
virtual uint32_t doSizeImage() const
Implements sizeImage(). Return the size of the image data area.
Definition: tiffcomposite_int.cpp:1843
virtual void doAccept(TiffVisitor &visitor)
Implements accept().
Definition: tiffcomposite_int.cpp:929
const uint32_t next
Special tag: next IFD.
Definition: tiffcomposite_int.hpp:74
virtual void doAccept(TiffVisitor &visitor)
Implements accept().
Definition: tiffcomposite_int.cpp:940
virtual TiffComponent * doAddChild(TiffComponent::AutoPtr tiffComponent)
Implements addChild(). The default implementation does nothing.
Definition: tiffcomposite_int.cpp:836
virtual uint32_t doSizeImage() const
Implements sizeImage(). Return 0.
Definition: tiffcomposite_int.cpp:1838
virtual void visitDirectoryEnd(TiffDirectory *object)
Operation to perform for a TIFF directory, at the end of the processing.
Definition: tiffvisitor_int.cpp:108
TiffComponent(uint16_t tag, IfdId group)
Constructor.
Definition: tiffcomposite_int.cpp:88
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:1874
TiffComponent::AutoPtr newTiffImageSize(uint16_t tag, IfdId group)
Function to create and initialize a new TIFF entry for image data (size)
Definition: tiffcomposite_int.hpp:1657
IfdId group_
Group that contains the tag.
Definition: tiffcomposite_int.hpp:390
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:51
virtual int idx() const
Return the unique id of the entry in the image.
Definition: tiffcomposite_int.cpp:350
const uint32_t all
Special tag: all tags in a group.
Definition: tiffcomposite_int.hpp:75
IfdId group() const
Return the group id of this component.
Definition: tiffcomposite_int.hpp:257
TiffEntry(uint16_t tag, IfdId group)
Constructor.
Definition: tiffcomposite_int.hpp:568
int defSize() const
Return the number of elements in the definition.
Definition: tiffcomposite_int.hpp:1416
virtual uint32_t doSize() const
Implements size(). Return the size of the TIFF directory, values and additional data,...
Definition: tiffcomposite_int.cpp:1671
uint32_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:1566
IfdId group() const
Return the group.
Definition: tiffcomposite_int.hpp:103
TiffSizeEntry(uint16_t tag, IfdId group, uint16_t dtTag, IfdId dtGroup)
Constructor.
Definition: tiffcomposite_int.hpp:821
void setElByteOrder(ByteOrder byteOrder)
Set the byte order of this element.
Definition: tiffcomposite_int.hpp:1512
A standard TIFF IFD entry consisting of a value which is an array of offsets to image data areas....
Definition: tiffcomposite_int.hpp:733
const Value * pValue() const
Return a const pointer to the converted value of this component.
Definition: tiffcomposite_int.hpp:473
const char * groupName(IfdId ifdId)
Return the group name for a group id.
Definition: tags_int.cpp:2540
Simple IO wrapper to ensure that the header is only written if there is any other data at all.
Definition: tiffcomposite_int.hpp:121
bool hasNext() const
Return true if the directory has a next pointer.
Definition: tiffcomposite_int.hpp:874
TiffType elTiffType_
Type for the array entry and the size element, if any.
Definition: tiffcomposite_int.hpp:1334
virtual uint32_t doCount() const
Implements count(). Todo: Document it!
Definition: tiffcomposite_int.cpp:1046
virtual uint32_t doWrite(IoWrapper &ioWrapper, ByteOrder byteOrder, int32_t offset, uint32_t valueIdx, uint32_t dataIdx, uint32_t &imageIdx)
Implements write() by forwarding the call to the actual concrete Makernote, if there is one.
Definition: tiffcomposite_int.cpp:1366
virtual DataBuf dataArea() const
Return a copy of the data area if the value has one. The caller owns this copy and DataBuf ensures th...
Definition: value.cpp:186
Key(const std::string &m, uint32_t e, IfdId g)
Constructor.
Definition: tiffcomposite_int.hpp:399
void encodeBinaryArray(TiffBinaryArray *object, const Exifdatum *datum)
Callback encoder function for a binary array.
Definition: tiffvisitor_int.cpp:950
TiffDataEntry(uint16_t tag, IfdId group, uint16_t szTag, IfdId szGroup)
Constructor.
Definition: tiffcomposite_int.hpp:656
uint32_t writeHeader(IoWrapper &ioWrapper, ByteOrder byteOrder) const
Write the header to a data buffer, return the number of bytes written.
Definition: tiffcomposite_int.cpp:554
virtual uint32_t doCount() const =0
Implements count().
virtual void setStrips(const Value *pSize, const byte *pData, uint32_t sizeData, uint32_t baseOffset)
Set the data areas ("strips").
Definition: tiffcomposite_int.cpp:396
Additional configuration for a binary array.
Definition: tiffcomposite_int.hpp:1325
virtual ~TiffDirectory()
Virtual destructor.
Definition: tiffcomposite_int.cpp:179
virtual uint32_t doSizeData() const
Implements sizeData(). Return 0.
Definition: tiffcomposite_int.cpp:1771
virtual void visitDataEntry(TiffDataEntry *object)=0
Operation to perform for a TIFF data entry.
TiffComponent * addChild(AutoPtr tiffComponent)
Add a child to the component. Default is to do nothing.
Definition: tiffcomposite_int.cpp:802
virtual uint32_t doSizeData() const =0
Implements sizeData().
virtual uint32_t doWrite(IoWrapper &ioWrapper, ByteOrder byteOrder, int32_t offset, uint32_t valueIdx, uint32_t dataIdx, uint32_t &imageIdx)
Implements write(). Write the value of a standard TIFF entry to the ioWrapper, return the number of b...
Definition: tiffcomposite_int.cpp:1253
const TiffType ttUnsignedLong
Exif LONG type.
Definition: tiffcomposite_int.hpp:52
std::vector< TiffComponent * > Components
Container type to hold all metadata.
Definition: tiffcomposite_int.hpp:176
TIFF mapping table for functions to decode special cases.
Definition: tiffcomposite_int.hpp:373
virtual void doAccept(TiffVisitor &visitor)
Implements accept().
Definition: tiffcomposite_int.cpp:898
virtual uint32_t doWriteImage(IoWrapper &ioWrapper, ByteOrder byteOrder) const
Implements writeImage(). Standard TIFF entries have no image data: write nothing and return 0.
Definition: tiffcomposite_int.cpp:1599
virtual void doAccept(TiffVisitor &visitor)
Implements accept().
Definition: tiffcomposite_int.cpp:888
uint32_t sizeHeader() const
Return the size of the header in bytes.
Definition: tiffcomposite_int.cpp:548
A TIFF IFD entry containing the size of a data area of a related TiffDataEntry. This component is use...
Definition: tiffcomposite_int.hpp:816
virtual uint32_t doSize() const
Implements size() by forwarding the call to the actual concrete Makernote, if there is one.
Definition: tiffcomposite_int.cpp:1713
virtual uint32_t doWriteImage(IoWrapper &ioWrapper, ByteOrder byteOrder) const
Implements writeImage(). Write the image data of the IFD of the Makernote. Return the number of bytes...
Definition: tiffcomposite_int.cpp:1615
virtual ~TiffDataEntry()
Virtual destructor.
Definition: tiffcomposite_int.cpp:210
uint32_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:1807
virtual TiffComponent * doAddNext(TiffComponent::AutoPtr tiffComponent)
Implements addNext(). The default implementation does nothing.
Definition: tiffcomposite_int.cpp:859
const int defSize_
Size of the array definition array.
Definition: tiffcomposite_int.hpp:1346
uint32_t extendedTag() const
Return the extended tag (32 bit so that it can contain special tags)
Definition: tiffcomposite_int.hpp:101
virtual uint32_t doSizeData() const
Implements sizeData(). Return the size of the image data area.
Definition: tiffcomposite_int.cpp:1776
uint16_t tag() const
Return the tag corresponding to the extended tag.
Definition: tiffcomposite_int.hpp:99
virtual uint32_t doWriteData(IoWrapper &ioWrapper, ByteOrder byteOrder, int32_t offset, uint32_t dataIdx, uint32_t &imageIdx) const
Implements writeData(). Write the image data area to the ioWrapper. Return the number of bytes writte...
Definition: tiffcomposite_int.cpp:1508
AutoPtr 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:288
const TiffType ttSignedLong
Exif SLONG type.
Definition: tiffcomposite_int.hpp:57
IfdId szGroup() const
Return the group of the entry which has the size.
Definition: tiffcomposite_int.hpp:629
virtual uint32_t doWrite(IoWrapper &ioWrapper, ByteOrder byteOrder, int32_t offset, uint32_t valueIdx, uint32_t dataIdx, uint32_t &imageIdx)
Implements write(). Todo: Document it!
Definition: tiffcomposite_int.cpp:1462
virtual ~TiffBinaryArray()
Virtual destructor.
Definition: tiffcomposite_int.cpp:232
virtual TiffComponent * doAddPath(uint16_t tag, TiffPath &tiffPath, TiffComponent *const pRoot, TiffComponent::AutoPtr object)
Implements addPath(). The default implementation does nothing.
Definition: tiffcomposite_int.cpp:752
Utility class containing a character array. All it does is to take care of memory allocation and dele...
Definition: types.hpp:193
EXIV2API long l2Data(byte *buf, int32_t l, ByteOrder byteOrder)
Convert a signed long to data, write the data to the buffer, return number of bytes written.
Definition: types.cpp:440
bool decoded() const
Return the flag which indicates if the array was decoded.
Definition: tiffcomposite_int.hpp:1418
@ unsignedByte
Exif BYTE type, 8-bit unsigned integer.
Definition: types.hpp:120
EXIV2API long us2Data(byte *buf, uint16_t s, ByteOrder byteOrder)
Convert an unsigned short to data, write the data to the buffer, return number of bytes written.
Definition: types.cpp:390
void encodeTiffEntry(TiffEntry *object, const Exifdatum *datum)
Callback encoder function for a standard TIFF entry.
Definition: tiffvisitor_int.cpp:994
@ signedByte
Exif SBYTE type, an 8-bit signed (twos-complement) integer.
Definition: types.hpp:125
virtual TiffBinaryElement * doClone() const
Internal virtual copy constructor, implements clone().
Definition: tiffcomposite_int.cpp:340
virtual void visitEntry(TiffEntry *object)=0
Operation to perform for a TIFF entry.
const ArrayDef * def_
Binary array definition array.
Definition: tiffcomposite_int.hpp:1345
virtual int putb(byte data)=0
Write one byte to the IO source. Current IO position is advanced by one byte.
TIFF composite visitor to decode metadata from the TIFF tree and add it to an Image,...
Definition: tiffvisitor_int.hpp:276
long size_
The current size of the buffer.
Definition: types.hpp:260
virtual uint32_t doSize() const =0
Implements size().
virtual uint32_t doWrite(IoWrapper &ioWrapper, ByteOrder byteOrder, int32_t offset, uint32_t valueIdx, uint32_t dataIdx, uint32_t &imageIdx)
Implements write(). Write the TIFF directory, values and additional data, including the next-IFD,...
Definition: tiffcomposite_int.cpp:1083
TiffComponent::AutoPtr newTiffDirectory(uint16_t tag, IfdId)
Function to create and initialize a new TIFF directory.
Definition: tiffcomposite_int.hpp:1594
DecoderFct decoderFct_
Decoder function for matching tags.
Definition: tiffcomposite_int.hpp:391
virtual uint32_t doWriteImage(IoWrapper &ioWrapper, ByteOrder byteOrder) const
Implements writeImage(). Write the image data of the TIFF directory to the ioWrapper by forwarding th...
Definition: tiffcomposite_int.cpp:1572
const uint32_t pana
Special tag: root IFD of Panasonic RAW images.
Definition: tiffcomposite_int.hpp:76
virtual ~TiffIfdMakernote()
Virtual destructor.
Definition: tiffcomposite_int.cpp:227
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:650
const byte * pData() const
Return a pointer to the binary representation of the value of this component.
Definition: tiffcomposite_int.hpp:471
virtual TiffIfdMakernote * doClone() const
Internal virtual copy constructor, implements clone().
Definition: tiffcomposite_int.cpp:329
virtual void doEncode(TiffEncoder &encoder, const Exifdatum *datum)
Implements encode().
Definition: tiffcomposite_int.cpp:968
void setTarget(int id, uint32_t target)
Wrapper for OffsetWriter::setTarget(), using an int instead of the enum to reduce include deps.
Definition: tiffcomposite_int.cpp:83
bool cmpTagLt(TiffComponent const *lhs, TiffComponent const *rhs)
Compare two TIFF component pointers by tag. Return true if the tag of component lhs is less than that...
Definition: tiffcomposite_int.cpp:1906
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:963
const ArrayCfg cfg_
Binary array configuration.
Definition: tiffcomposite_int.hpp:1344
virtual ~TiffDataEntryBase()
Virtual destructor.
Definition: tiffcomposite_int.cpp:206
void encodeBinaryElement(TiffBinaryElement *object, const Exifdatum *datum)
Callback encoder function for an element of a binary array.
Definition: tiffvisitor_int.cpp:955
virtual void doAccept(TiffVisitor &visitor)
Implements accept().
Definition: tiffcomposite_int.cpp:893
virtual void doEncode(TiffEncoder &encoder, const Exifdatum *datum)
Implements encode().
Definition: tiffcomposite_int.cpp:993
std::string m_
Camera make.
Definition: tiffcomposite_int.hpp:400
ByteOrder elByteOrder() const
Return the byte order of this element.
Definition: tiffcomposite_int.hpp:1524
virtual uint32_t doWrite(IoWrapper &ioWrapper, ByteOrder byteOrder, int32_t offset, uint32_t valueIdx, uint32_t dataIdx, uint32_t &imageIdx)=0
Implements write().
virtual long toLong(long n=0) const =0
Convert the n-th component of the value to a long. The behaviour of this method may be undefined if t...
virtual ~TiffBinaryElement()
Virtual destructor.
Definition: tiffcomposite_int.cpp:239
uint32_t count_
Number of components.
Definition: tiffcomposite_int.hpp:1321
IfdId dtGroup() const
Return the group of the related entry which has the data area.
Definition: tiffcomposite_int.hpp:832
virtual long copy(byte *buf, ByteOrder byteOrder) const =0
Write value to a data buffer.
virtual void visitBinaryElement(TiffBinaryElement *object)=0
Operation to perform for an element of a binary array.
virtual uint32_t doSizeData() const
Implements sizeData(). Return the sum of the sizes of all sub-IFDs.
Definition: tiffcomposite_int.cpp:1792
Provides classes and functions to encode and decode Exif and Iptc data. The libexiv2 API consists of ...
Definition: asfvideo.hpp:36
virtual TiffDataEntry * doClone() const
Internal virtual copy constructor, implements clone().
Definition: tiffcomposite_int.cpp:298
virtual uint32_t doWriteData(IoWrapper &ioWrapper, ByteOrder byteOrder, int32_t offset, uint32_t dataIdx, uint32_t &imageIdx) const
Implements writeData(). Write the data area to the ioWrapper. Return the number of bytes written.
Definition: tiffcomposite_int.cpp:1522
uint32_t extendedTag_
Tag (32 bit so that it can contain special tags)
Definition: tiffcomposite_int.hpp:389
virtual TiffComponent * doAddNext(TiffComponent::AutoPtr tiffComponent)
Implements addNext(). The default implementation does nothing.
Definition: tiffcomposite_int.cpp:869
virtual void visitImageEntry(TiffImageEntry *object)=0
Operation to perform for a TIFF image entry.
virtual uint32_t doWrite(IoWrapper &ioWrapper, ByteOrder byteOrder, int32_t offset, uint32_t valueIdx, uint32_t dataIdx, uint32_t &imageIdx)
Implements write(). Write pointers into the data area to the ioWrapper, relative to the offsets in th...
Definition: tiffcomposite_int.cpp:1291
CryptFct cryptFct_
Crypt function, 0 if not used.
Definition: tiffcomposite_int.hpp:1335
TypeId
Exiv2 value type identifiers.
Definition: types.hpp:119
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:566
TiffType toTiffType(TypeId typeId)
Convert the Exiv2 typeId to a TIFF value type.
Definition: tiffcomposite_int.cpp:1893
uint16_t szTag() const
Return the group of the entry which has the size.
Definition: tiffcomposite_int.hpp:627
virtual uint32_t doCount() const
Implements count(). Return the number of entries in the IFD of the Makernote. Does not count entries ...
Definition: tiffcomposite_int.cpp:1041
uint16_t tag() const
Return the tag corresponding to the extended tag.
Definition: tiffcomposite_int.hpp:385
EXIV2API long ul2Data(byte *buf, uint32_t l, ByteOrder byteOrder)
Convert an unsigned long to data, write the data to the buffer, return number of bytes written.
Definition: types.cpp:403
TiffComponent * addNext(AutoPtr tiffComponent)
Add a "next" component to the component. Default is to do nothing.
Definition: tiffcomposite_int.cpp:849
static const char * typeName(TypeId typeId)
Return the name of the type, 0 if unknown.
Definition: types.cpp:102
virtual void visitBinaryArrayEnd(TiffBinaryArray *object)
Operation to perform for a TIFF binary array, at the end of the processing.
Definition: tiffvisitor_int.cpp:116
static std::auto_ptr< TiffComponent > create(uint32_t extendedTag, IfdId group)
Create the TiffComponent for TIFF entry extendedTag and group. The embedded lookup table is used to f...
Definition: tiffimage_int.cpp:1675
Tag information.
Definition: tags.hpp:74
virtual void doAccept(TiffVisitor &visitor)=0
Implements accept().
const TagInfo * exifTagList()
Return read-only list of built-in Exif IFD tags.
Definition: tags_int.cpp:2096
virtual TiffDirectory * doClone() const
Internal virtual copy constructor, implements clone().
Definition: tiffcomposite_int.cpp:313
const ArrayCfg * cfg() const
Return a pointer to the configuration.
Definition: tiffcomposite_int.hpp:1412
#define EXV_WARNING
Shorthand for a temp warning log message object and return its ostringstream.
Definition: error.hpp:148
virtual uint32_t doSize() const
Implements size(). Return the size of a standard TIFF entry.
Definition: tiffcomposite_int.cpp:1698
const TiffType ttUnsignedByte
Exif BYTE type.
Definition: tiffcomposite_int.hpp:49
virtual void doEncode(TiffEncoder &encoder, const Exifdatum *datum)
Implements encode().
Definition: tiffcomposite_int.cpp:988
TiffPathItem(uint32_t extendedTag, IfdId group)
Constructor.
Definition: tiffcomposite_int.hpp:92
const TiffType ttUndefined
Exif UNDEFINED type.
Definition: tiffcomposite_int.hpp:55
EncoderFct encoderFct_
Encoder function for matching tags.
Definition: tiffcomposite_int.hpp:392
TIFF composite visitor to read the TIFF structure from a block of memory and build the composite from...
Definition: tiffvisitor_int.hpp:622
virtual long write(const byte *data, long wcount)=0
Write data to the IO source. Current IO position is advanced by the number of bytes written.
virtual void doEncode(TiffEncoder &encoder, const Exifdatum *datum)
Implements encode().
Definition: tiffcomposite_int.cpp:978
virtual uint32_t doSize() const
Implements size(). Returns count * type-size, both taken from the element definition.
Definition: tiffcomposite_int.cpp:1754
bool readHeader(const byte *pData, uint32_t size, ByteOrder byteOrder)
Read the header from a data buffer, return true if successful.
Definition: tiffcomposite_int.cpp:535
uint16_t TiffType
TIFF value type.
Definition: tiffcomposite_int.hpp:47
Class to insert pointers or offsets to computed addresses at specific locations in an image....
Definition: tiffimage_int.hpp:419
void setOffset(int32_t offset)
Set the offset.
Definition: tiffcomposite_int.hpp:435
uint32_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:1760
virtual TiffComponent * doAddChild(AutoPtr tiffComponent)
Implements addChild(). The default implementation does nothing.
Definition: tiffcomposite_int.cpp:807
void setElDef(const ArrayDef &def)
Set the array definition for this element.
Definition: tiffcomposite_int.hpp:1508
const TagInfo * gpsTagList()
Return read-only list of built-in GPS tags.
Definition: tags_int.cpp:2316
int32_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
uint32_t size(uint16_t tag, IfdId group) const
Get the size in bytes of a tag.
Definition: tiffcomposite_int.cpp:560
ByteOrder
Type to express the byte order (little or big endian)
Definition: types.hpp:102
uint32_t tagStep() const
Return the size of the default tag, which is used to calculate tag numbers as idx/tagStep.
Definition: tiffcomposite_int.hpp:1330
Composite to model an array of different tags. The tag types as well as other aspects of the array ar...
Definition: tiffcomposite_int.hpp:1354
void iniOrigDataBuf()
Initialize the original data buffer and its size from the base entry.
Definition: tiffcomposite_int.cpp:594
virtual uint32_t doWriteData(IoWrapper &ioWrapper, ByteOrder byteOrder, int32_t offset, uint32_t dataIdx, uint32_t &imageIdx) const
Implements writeData(). Standard TIFF entries have no data: write nothing and return 0.
Definition: tiffcomposite_int.cpp:1499
virtual void doEncode(TiffEncoder &encoder, const Exifdatum *datum)
Implements encode().
Definition: tiffcomposite_int.cpp:983
const uint32_t root
Special tag: root IFD.
Definition: tiffcomposite_int.hpp:73
TiffImageEntry(uint16_t tag, IfdId group, uint16_t szTag, IfdId szGroup)
Constructor.
Definition: tiffcomposite_int.hpp:739
virtual ~TiffSubIfd()
Virtual destructor.
Definition: tiffcomposite_int.cpp:187
const TiffType ttTiffDouble
TIFF DOUBLE type.
Definition: tiffcomposite_int.hpp:60
virtual void visitDirectoryNext(TiffDirectory *object)
Operation to perform for a TIFF directory, after all components and before the next entry is processe...
Definition: tiffvisitor_int.cpp:104
virtual uint32_t doWriteImage(IoWrapper &ioWrapper, ByteOrder byteOrder) const
Implements writeImage(). Write the image data area to the ioWrapper. Return the number of bytes writt...
Definition: tiffcomposite_int.cpp:1625
virtual uint32_t doSize() const
Implements size(). Return the size of the Makernote header, TIFF directory, values and additional dat...
Definition: tiffcomposite_int.cpp:1721
TiffComponent::AutoPtr newTiffBinaryArray0(uint16_t tag, IfdId group)
Function to create and initialize a new binary array entry.
Definition: tiffcomposite_int.hpp:1608
virtual uint32_t doWriteImage(IoWrapper &ioWrapper, ByteOrder byteOrder) const =0
Implements writeImage().
virtual void doEncode(TiffEncoder &encoder, const Exifdatum *datum)
Implements encode().
Definition: tiffcomposite_int.cpp:1003
virtual ~TiffImageEntry()
Virtual destructor.
Definition: tiffcomposite_int.cpp:214
long write(const byte *pData, long wcount)
Wraps the corresponding BasicIo::write() method.
Definition: tiffcomposite_int.cpp:65
virtual void doAccept(TiffVisitor &visitor)
Implements accept().
Definition: tiffcomposite_int.cpp:920
BasicError< char > Error
Error class used for exceptions (std::string based)
Definition: error.hpp:324
TiffComponent::AutoPtr newTiffEntry(uint16_t tag, IfdId group)
Function to create and initialize a new TIFF entry.
Definition: tiffcomposite_int.cpp:1921
bool concat_
If true, concatenate gaps between defined tags to single tags.
Definition: tiffcomposite_int.hpp:1338
virtual long sizeDataArea() const
Return the size of the data area, 0 if there is none.
Definition: value.cpp:181
virtual byte * mmap(bool=false)
Allow direct access to the underlying data buffer. The buffer is not protected against write access i...
Definition: basicio.cpp:1338
virtual void doEncode(TiffEncoder &encoder, const Exifdatum *datum)
Implements encode().
Definition: tiffcomposite_int.cpp:998
uint32_t write(IoWrapper &ioWrapper, ByteOrder byteOrder, int32_t offset, uint32_t valueIdx, uint32_t dataIdx, uint32_t &imageIdx)
Write a TiffComponent to a binary image.
Definition: tiffcomposite_int.cpp:1073
TiffDataEntryBase(uint16_t tag, IfdId group, uint16_t szTag, IfdId szGroup)
Constructor.
Definition: tiffcomposite_int.hpp:600
TiffComponent::AutoPtr newTiffSubIfd(uint16_t tag, IfdId group)
Function to create and initialize a new TIFF sub-directory.
Definition: tiffcomposite_int.hpp:1601
static TiffComponent * create(uint16_t tag, IfdId group, const std::string &make, const byte *pData, uint32_t size, ByteOrder byteOrder)
Create the Makernote for camera make and details from the makernote entry itself if needed....
Definition: makernote_int.cpp:166
virtual long write(const byte *data, long wcount)
Write data to the memory block. If needed, the size of the internal memory block is expanded....
Definition: basicio.cpp:1226
uint32_t mnOffset() const
Return the offset to the makernote from the start of the TIFF header.
Definition: tiffcomposite_int.cpp:524
std::auto_ptr< TiffComponent > AutoPtr
TiffComponent auto_ptr type.
Definition: tiffcomposite_int.hpp:174
virtual uint32_t doCount() const
Implements count(). Return number of components in the entry.
Definition: tiffcomposite_int.cpp:1023
uint16_t tag_
Tag.
Definition: tags.hpp:87
virtual uint32_t doCount() const
Implements count(). Return the number of entries in the TIFF directory. Does not count entries which ...
Definition: tiffcomposite_int.cpp:1013
const ArrayDef * elDef() const
Return the array definition of this element.
Definition: tiffcomposite_int.hpp:1520
const char * make_
Camera make for which these mapping functions apply.
Definition: tiffcomposite_int.hpp:388
OffsetId
Identifiers for supported offsets.
Definition: tiffimage_int.hpp:422
byte * start() const
Return a pointer to the start of the binary representation of the component.
Definition: tiffcomposite_int.hpp:259
ArrayDef elDefaultDef_
Default element.
Definition: tiffcomposite_int.hpp:1339
virtual TiffSubIfd * doClone() const
Internal virtual copy constructor, implements clone().
Definition: tiffcomposite_int.cpp:318
virtual void doEncode(TiffEncoder &encoder, const Exifdatum *datum)
Implements encode().
Definition: tiffcomposite_int.cpp:973
ByteOrder byteOrder() const
Return the byte order for the makernote. Requires the image byte order to be set (setImageByteOrder()...
Definition: tiffcomposite_int.cpp:515
uint32_t doSize() const
Implements size(). Return the size of the sub-Ifd pointers.
Definition: tiffcomposite_int.cpp:1708
const TiffType ttSignedByte
Exif SBYTE type.
Definition: tiffcomposite_int.hpp:54
virtual size_t size() const
Get the current memory buffer size in bytes.
Definition: basicio.cpp:1353
@ geKnownMakernote
Signal used by TiffReader to signal an unknown makernote.
Definition: tiffvisitor_int.hpp:72
#define EXV_ERROR
Shorthand for a temp error log message object and return its ostringstream.
Definition: error.hpp:150
virtual void visitDirectory(TiffDirectory *object)=0
Operation to perform for a TIFF directory.
virtual void doAccept(TiffVisitor &visitor)
Implements accept().
Definition: tiffcomposite_int.cpp:903
uint32_t e_
Extended tag.
Definition: tiffcomposite_int.hpp:401
virtual TiffComponent * doClone() const =0
Internal virtual copy constructor, implements clone().
virtual uint32_t doSizeImage() const
Implements sizeImage(). Return the sum of the image sizes of all components plus that of the next-IFD...
Definition: tiffcomposite_int.cpp:1812
TiffComponent::AutoPtr newTiffBinaryArray1(uint16_t tag, IfdId group)
Function to create and initialize a new simple binary array entry.
Definition: tiffcomposite_int.hpp:1617
virtual void doEncode(TiffEncoder &encoder, const Exifdatum *datum)=0
Implements encode().
TiffDirectory(uint16_t tag, IfdId group, bool hasNext=true)
Default constructor.
Definition: tiffcomposite_int.hpp:865
An interface for simple binary IO.
Definition: basicio.hpp:55
This class models a TIFF sub-directory (sub-IFD). A sub-IFD is an entry with one or more values that ...
Definition: tiffcomposite_int.hpp:982
const TiffType ttTiffFloat
TIFF FLOAT type.
Definition: tiffcomposite_int.hpp:59
virtual TiffImageEntry * doClone() const
Internal virtual copy constructor, implements clone().
Definition: tiffcomposite_int.cpp:303
virtual TiffComponent * doAddChild(TiffComponent::AutoPtr tiffComponent)
Implements addChild(). The default implementation does nothing.
Definition: tiffcomposite_int.cpp:819
virtual TiffComponent * doAddPath(uint16_t tag, TiffPath &tiffPath, TiffComponent *const pRoot, TiffComponent::AutoPtr object)
Implements addPath(). The default implementation does nothing.
Definition: tiffcomposite_int.cpp:695
Tiff IFD Makernote. This is a concrete class suitable for all IFD makernotes.
Definition: tiffcomposite_int.hpp:1147
Defines one tag in a binary array.
Definition: tiffcomposite_int.hpp:1313
TiffEntryBase(uint16_t tag, IfdId group, TiffType tiffType=ttUndefined)
Default constructor.
Definition: tiffcomposite_int.cpp:93
bool operator==(uint32_t idx) const
Comparison with idx.
Definition: tiffcomposite_int.hpp:1315
IoWrapper(BasicIo &io, const byte *pHeader, long size, OffsetWriter *pow)
Definition: tiffcomposite_int.cpp:59
virtual void setStrips(const Value *pSize, const byte *pData, uint32_t sizeData, uint32_t baseOffset)=0
Set the data areas ("strips").
uint32_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:529
const TiffType ttAsciiString
Exif ASCII type.
Definition: tiffcomposite_int.hpp:50
virtual void doAccept(TiffVisitor &visitor)
Implements accept().
Definition: tiffcomposite_int.cpp:958
void setIdx(int idx)
Set the unique id of the entry in the image.
Definition: tiffcomposite_int.hpp:490
const TiffType ttSignedShort
Exif SSHORT type.
Definition: tiffcomposite_int.hpp:56
static long typeSize(TypeId typeId)
Return the size in bytes of one element of this type.
Definition: types.cpp:116
virtual uint32_t doWriteData(IoWrapper &ioWrapper, ByteOrder byteOrder, int32_t offset, uint32_t dataIdx, uint32_t &imageIdx) const
This class does not really implement writeData(), it only has write(). This method must not be called...
Definition: tiffcomposite_int.cpp:1556
virtual int idx() const
Return the unique id of the entry in the image.
Definition: tiffcomposite_int.cpp:345
virtual TiffComponent * doAddChild(TiffComponent::AutoPtr tiffComponent)
Implements addChild(). The default implementation does nothing.
Definition: tiffcomposite_int.cpp:812
TiffComponent::AutoPtr newTiffThumbData(uint16_t tag, IfdId group)
Function to create and initialize a new TIFF entry for a thumbnail (data)
Definition: tiffcomposite_int.hpp:1633
std::auto_ptr< Value > AutoPtr
Shortcut for a Value auto pointer.
Definition: value.hpp:54
A tupel consisting of extended Tag and group used as an item in TIFF paths.
Definition: tiffcomposite_int.hpp:87
This class models a TIFF directory (Ifd). It is a composite component of the TIFF tree.
Definition: tiffcomposite_int.hpp:858
virtual uint32_t doWriteData(IoWrapper &ioWrapper, ByteOrder byteOrder, int32_t offset, uint32_t dataIdx, uint32_t &imageIdx) const
Implements writeData(). Write the sub-IFDs to the ioWrapper. Return the number of bytes written.
Definition: tiffcomposite_int.cpp:1539
const TiffType ttUnsignedShort
Exif SHORT type.
Definition: tiffcomposite_int.hpp:51
DataBuf(* CryptFct)(uint16_t, const byte *, uint32_t, TiffComponent *const)
Function pointer type for a crypt function used for binary arrays.
Definition: tiffcomposite_int.hpp:1310
static uint32_t writeOffset(byte *buf, int32_t offset, TiffType tiffType, ByteOrder byteOrder)
Helper function to write an offset to a preallocated binary buffer.
Definition: tiffcomposite_int.cpp:1268
EXIV2API long s2Data(byte *buf, int16_t s, ByteOrder byteOrder)
Convert a signed short to data, write the data to the buffer, return number of bytes written.
Definition: types.cpp:427
virtual uint32_t doWrite(IoWrapper &ioWrapper, ByteOrder byteOrder, int32_t offset, uint32_t valueIdx, uint32_t dataIdx, uint32_t &imageIdx)
Implements write(). Todo: Document it!
Definition: tiffcomposite_int.cpp:1396
void setTarget(OffsetId id, uint32_t target)
Set the target for offset id, i.e., the address to which the offset points.
Definition: tiffimage_int.cpp:2132
Error class for exceptions, log message class.
ByteOrder byteOrder_
Byte order, invalidByteOrder to inherit.
Definition: tiffcomposite_int.hpp:1333
TiffComponent::AutoPtr newTiffBinaryElement(uint16_t tag, IfdId group)
Function to create and initialize a new binary array element.
Definition: tiffcomposite_int.cpp:1931
virtual void visitIfdMakernoteEnd(TiffIfdMakernote *object)
Operation to perform after processing an IFD makernote.
Definition: tiffvisitor_int.cpp:112
virtual TiffComponent * doAddPath(uint16_t tag, TiffPath &tiffPath, TiffComponent *const pRoot, TiffComponent::AutoPtr object)
Implements addPath(). The default implementation does nothing.
Definition: tiffcomposite_int.cpp:643