Exiv2
makernote_int.hpp
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 
3 #ifndef EXIV2_MAKERNOTE_INT_HPP
4 #define EXIV2_MAKERNOTE_INT_HPP
5 
6 // *****************************************************************************
7 // included header files
8 #include "tags_int.hpp"
9 #include "types.hpp"
10 
11 // namespace extensions
12 namespace Exiv2::Internal {
13 class IoWrapper;
14 class TiffComponent;
15 // *****************************************************************************
16 // function prototypes
20 std::string getExiv2ConfigPath();
21 
25 std::string readExiv2Config(const std::string& section, const std::string& value, const std::string& def);
26 
27 // *****************************************************************************
28 // class definitions
29 
31 using NewMnFct = TiffComponent* (*)(uint16_t, IfdId, IfdId, const byte*, size_t, ByteOrder);
32 
34 using NewMnFct2 = TiffComponent* (*)(uint16_t tag, IfdId group, IfdId mnGroup);
35 
38  struct MakeKey;
46  bool operator==(const std::string& key) const;
47 
49  bool operator==(IfdId key) const;
50 
51  // DATA
52  const char* make_;
53  IfdId mnGroup_;
56 };
57 
62  public:
74  static TiffComponent* create(uint16_t tag, IfdId group, const std::string& make, const byte* pData, size_t size,
75  ByteOrder byteOrder);
80  static TiffComponent* create(uint16_t tag, IfdId group, IfdId mnGroup);
81 
82  ~TiffMnCreator() = default;
84  TiffMnCreator(const TiffComponent&) = delete;
85  TiffMnCreator& operator=(const TiffComponent&) = delete;
86 
87  private:
88  static const TiffMnRegistry registry_[];
89 };
90 
92 class MnHeader {
93  public:
95 
96  virtual ~MnHeader() = default;
99 
101  virtual bool read(const byte* pData, size_t size, ByteOrder byteOrder) = 0;
106  virtual void setByteOrder(ByteOrder byteOrder);
108 
110  [[nodiscard]] virtual size_t size() const = 0;
113  virtual size_t write(IoWrapper& ioWrapper, ByteOrder byteOrder) const = 0;
118  [[nodiscard]] virtual size_t ifdOffset() const;
124  [[nodiscard]] virtual ByteOrder byteOrder() const;
130  [[nodiscard]] virtual size_t baseOffset(size_t mnOffset) const;
132 
133 }; // class MnHeader
134 
136 class OlympusMnHeader : public MnHeader {
137  public:
139 
140  OlympusMnHeader();
143 
145  bool read(const byte* pData, size_t size, ByteOrder byteOrder) override;
147 
149  [[nodiscard]] size_t size() const override;
150  size_t write(IoWrapper& ioWrapper, ByteOrder byteOrder) const override;
151  [[nodiscard]] size_t ifdOffset() const override;
153  static size_t sizeOfSignature();
155 
156  private:
157  DataBuf header_;
158  static const byte signature_[];
159 
160 }; // class OlympusMnHeader
161 
163 class Olympus2MnHeader : public MnHeader {
164  public:
166 
170 
172  bool read(const byte* pData, size_t size, ByteOrder byteOrder) override;
174 
176  [[nodiscard]] size_t size() const override;
177  size_t write(IoWrapper& ioWrapper, ByteOrder byteOrder) const override;
178  [[nodiscard]] size_t ifdOffset() const override;
179  [[nodiscard]] size_t baseOffset(size_t mnOffset) const override;
181  static size_t sizeOfSignature();
183 
184  private:
185  DataBuf header_;
186  static const byte signature_[];
187 
188 }; // class Olympus2MnHeader
189 
191 class OMSystemMnHeader : public MnHeader {
192  public:
194 
198 
200  bool read(const byte* pData, size_t size, ByteOrder byteOrder) override;
202 
204  [[nodiscard]] size_t size() const override;
205  size_t write(IoWrapper& ioWrapper, ByteOrder byteOrder) const override;
206  [[nodiscard]] size_t ifdOffset() const override;
207  [[nodiscard]] size_t baseOffset(size_t mnOffset) const override;
209  static size_t sizeOfSignature();
211 
212  private:
213  DataBuf header_;
214  static const byte signature_[];
215 
216 }; // class OMSystemMnHeader
217 
219 class FujiMnHeader : public MnHeader {
220  public:
222 
223  FujiMnHeader();
226 
228  bool read(const byte* pData, size_t size, ByteOrder byteOrder) override;
229  // setByteOrder not implemented
231 
233  [[nodiscard]] size_t size() const override;
234  size_t write(IoWrapper& ioWrapper, ByteOrder byteOrder) const override;
235  [[nodiscard]] size_t ifdOffset() const override;
236  [[nodiscard]] ByteOrder byteOrder() const override;
237  [[nodiscard]] size_t baseOffset(size_t mnOffset) const override;
239  static size_t sizeOfSignature();
241 
242  private:
243  DataBuf header_;
244  static const byte signature_[];
245  static const ByteOrder byteOrder_;
246  size_t start_{0};
247 
248 }; // class FujiMnHeader
249 
251 class Nikon2MnHeader : public MnHeader {
252  public:
254 
255  Nikon2MnHeader();
258 
260  bool read(const byte* pData, size_t size, ByteOrder byteOrder) override;
262 
264  [[nodiscard]] size_t size() const override;
265  size_t write(IoWrapper& ioWrapper, ByteOrder byteOrder) const override;
266  [[nodiscard]] size_t ifdOffset() const override;
268  static size_t sizeOfSignature();
270 
271  private:
272  DataBuf buf_;
273  size_t start_{0};
274  static const byte signature_[];
275 
276 }; // class Nikon2MnHeader
277 
279 class Nikon3MnHeader : public MnHeader {
280  public:
282 
283  Nikon3MnHeader();
286 
288  bool read(const byte* pData, size_t size, ByteOrder byteOrder) override;
289  void setByteOrder(ByteOrder byteOrder) override;
291 
293  [[nodiscard]] size_t size() const override;
294  size_t write(IoWrapper& ioWrapper, ByteOrder byteOrder) const override;
295  [[nodiscard]] size_t ifdOffset() const override;
296  [[nodiscard]] ByteOrder byteOrder() const override;
297  [[nodiscard]] size_t baseOffset(size_t mnOffset) const override;
299  static size_t sizeOfSignature();
301 
302  private:
303  DataBuf buf_;
304  ByteOrder byteOrder_{invalidByteOrder};
305  size_t start_;
306  static const byte signature_[];
307 
308 }; // class Nikon3MnHeader
309 
311 class PanasonicMnHeader : public MnHeader {
312  public:
314 
318 
320  bool read(const byte* pData, size_t size, ByteOrder byteOrder) override;
322 
324  [[nodiscard]] size_t size() const override;
325  size_t write(IoWrapper& ioWrapper, ByteOrder byteOrder) const override;
326  [[nodiscard]] size_t ifdOffset() const override;
328  static size_t sizeOfSignature();
330 
331  private:
332  DataBuf buf_;
333  size_t start_{0};
334  static const byte signature_[];
335 
336 }; // class PanasonicMnHeader
337 
339 class PentaxDngMnHeader : public MnHeader {
340  public:
342 
346 
348  bool read(const byte* pData, size_t size, ByteOrder byteOrder) override;
350 
352  [[nodiscard]] size_t size() const override;
353  size_t write(IoWrapper& ioWrapper, ByteOrder byteOrder) const override;
354  [[nodiscard]] size_t ifdOffset() const override;
355  [[nodiscard]] size_t baseOffset(size_t mnOffset) const override;
357  static size_t sizeOfSignature();
359 
360  private:
361  DataBuf header_;
362  static const byte signature_[];
363 
364 }; // class PentaxDngMnHeader
365 
367 class PentaxMnHeader : public MnHeader {
368  public:
370 
371  PentaxMnHeader();
374 
376  bool read(const byte* pData, size_t size, ByteOrder byteOrder) override;
378 
380  [[nodiscard]] size_t size() const override;
381  size_t write(IoWrapper& ioWrapper, ByteOrder byteOrder) const override;
382  [[nodiscard]] size_t ifdOffset() const override;
384  static size_t sizeOfSignature();
386 
387  private:
388  DataBuf header_;
389  static const byte signature_[];
390 
391 }; // class PentaxMnHeader
392 
394 class SamsungMnHeader : public MnHeader {
395  public:
397 
398  SamsungMnHeader();
401 
403  bool read(const byte* pData, size_t size, ByteOrder byteOrder) override;
405 
407  [[nodiscard]] size_t size() const override;
408  size_t write(IoWrapper& ioWrapper, ByteOrder byteOrder) const override;
409  [[nodiscard]] size_t baseOffset(size_t mnOffset) const override;
411 
412 }; // class SamsungMnHeader
413 
415 class SigmaMnHeader : public MnHeader {
416  public:
418 
419  SigmaMnHeader();
422 
424  bool read(const byte* pData, size_t size, ByteOrder byteOrder) override;
426 
428  [[nodiscard]] size_t size() const override;
429  size_t write(IoWrapper& ioWrapper, ByteOrder byteOrder) const override;
430  [[nodiscard]] size_t ifdOffset() const override;
432  static size_t sizeOfSignature();
434 
435  private:
436  DataBuf buf_;
437  size_t start_{0};
438  static const byte signature1_[];
439  static const byte signature2_[];
440 
441 }; // class SigmaMnHeader
442 
444 class SonyMnHeader : public MnHeader {
445  public:
447 
448  SonyMnHeader();
451 
453  bool read(const byte* pData, size_t size, ByteOrder byteOrder) override;
455 
457  [[nodiscard]] size_t size() const override;
458  size_t write(IoWrapper& ioWrapper, ByteOrder byteOrder) const override;
459  [[nodiscard]] size_t ifdOffset() const override;
461  static size_t sizeOfSignature();
463 
464  private:
465  DataBuf buf_;
466  size_t start_{0};
467  static const byte signature_[];
468 
469 }; // class SonyMnHeader
470 
472 class Casio2MnHeader : public MnHeader {
473  public:
475 
476  Casio2MnHeader();
479 
481  bool read(const byte* pData, size_t size, ByteOrder byteOrder) override;
483 
485  [[nodiscard]] size_t size() const override;
486  size_t write(IoWrapper& ioWrapper, ByteOrder byteOrder) const override;
487  [[nodiscard]] size_t ifdOffset() const override;
488  [[nodiscard]] ByteOrder byteOrder() const override;
490  static size_t sizeOfSignature();
492 
493  private:
494  DataBuf buf_;
495  size_t start_{0};
496  static const byte signature_[];
497  static const ByteOrder byteOrder_;
498 
499 }; // class Casio2MnHeader
500 
501 // *****************************************************************************
502 // template, inline and free functions
503 
505 TiffComponent* newIfdMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte* pData, size_t size, ByteOrder byteOrder);
506 
508 TiffComponent* newIfdMn2(uint16_t tag, IfdId group, IfdId mnGroup);
509 
511 TiffComponent* newOlympusMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte* pData, size_t size,
512  ByteOrder byteOrder);
513 
515 TiffComponent* newOlympusMn2(uint16_t tag, IfdId group, IfdId mnGroup);
516 
518 TiffComponent* newOlympus2Mn2(uint16_t tag, IfdId group, IfdId mnGroup);
519 
521 TiffComponent* newOMSystemMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte* pData, size_t size,
522  ByteOrder byteOrder);
523 
525 TiffComponent* newOMSystemMn2(uint16_t tag, IfdId group, IfdId mnGroup);
526 
528 TiffComponent* newFujiMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte* pData, size_t size, ByteOrder byteOrder);
529 
531 TiffComponent* newFujiMn2(uint16_t tag, IfdId group, IfdId mnGroup);
532 
537 TiffComponent* newNikonMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte* pData, size_t size,
538  ByteOrder byteOrder);
539 
541 TiffComponent* newNikon2Mn2(uint16_t tag, IfdId group, IfdId mnGroup);
542 
544 TiffComponent* newNikon3Mn2(uint16_t tag, IfdId group, IfdId mnGroup);
545 
547 TiffComponent* newPanasonicMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte* pData, size_t size,
548  ByteOrder byteOrder);
549 
551 TiffComponent* newPanasonicMn2(uint16_t tag, IfdId group, IfdId mnGroup);
552 
554 TiffComponent* newPentaxMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte* pData, size_t size,
555  ByteOrder byteOrder);
556 
558 TiffComponent* newPentaxMn2(uint16_t tag, IfdId group, IfdId mnGroup);
559 
561 TiffComponent* newPentaxDngMn2(uint16_t tag, IfdId group, IfdId mnGroup);
562 
564 TiffComponent* newSamsungMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte* pData, size_t size,
565  ByteOrder byteOrder);
566 
568 TiffComponent* newSamsungMn2(uint16_t tag, IfdId group, IfdId mnGroup);
569 
571 TiffComponent* newSigmaMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte* pData, size_t size,
572  ByteOrder byteOrder);
573 
575 TiffComponent* newSigmaMn2(uint16_t tag, IfdId group, IfdId mnGroup);
576 
578 TiffComponent* newSonyMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte* pData, size_t size, ByteOrder byteOrder);
579 
581 TiffComponent* newSony1Mn2(uint16_t tag, IfdId group, IfdId mnGroup);
582 
584 TiffComponent* newSony2Mn2(uint16_t tag, IfdId group, IfdId mnGroup);
585 
587 TiffComponent* newCasioMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte* pData, size_t size,
588  ByteOrder byteOrder);
589 
591 TiffComponent* newCasio2Mn2(uint16_t tag, IfdId group, IfdId mnGroup);
592 
602 int sonyCsSelector(uint16_t tag, const byte* pData, size_t size, TiffComponent* pRoot);
603 
613 int sony2010eSelector(uint16_t tag, const byte* pData, size_t size, TiffComponent* pRoot);
614 
624 int sony2FpSelector(uint16_t tag, const byte* pData, size_t size, TiffComponent* pRoot);
625 
635 int sonyMisc2bSelector(uint16_t tag, const byte* pData, size_t size, TiffComponent* pRoot);
636 
646 int sonyMisc3cSelector(uint16_t tag, const byte* pData, size_t size, TiffComponent* pRoot);
647 
657 int nikonSelector(uint16_t tag, const byte* pData, size_t size, TiffComponent* pRoot);
658 
675 DataBuf nikonCrypt(uint16_t tag, const byte* pData, size_t size, TiffComponent* pRoot);
676 
677 } // namespace Exiv2::Internal
678 
679 #endif // EXIV2_MAKERNOTE_INT_HPP
size_t write(IoWrapper &ioWrapper, ByteOrder byteOrder) const override
Write the header to a data buffer, return the number of bytes written.
Definition: makernote_int.cpp:236
const char * make_
Camera make.
Definition: makernote_int.hpp:52
size_t size() const override
Return the size of the header (in bytes).
Definition: makernote_int.cpp:330
bool read(const byte *pData, size_t size, ByteOrder byteOrder) override
Read the header from a data buffer, return true if ok.
Definition: makernote_int.cpp:497
size_t write(IoWrapper &ioWrapper, ByteOrder byteOrder) const override
Write the header to a data buffer, return the number of bytes written.
Definition: makernote_int.cpp:474
size_t ifdOffset() const override
Return the offset to the start of the Makernote IFD from the start of the Makernote (= the start of t...
Definition: makernote_int.cpp:614
size_t size() const override
Return the size of the header (in bytes).
Definition: makernote_int.cpp:366
PentaxDngMnHeader()
Default constructor.
Definition: makernote_int.cpp:450
TiffComponent * newCasioMn(uint16_t tag, IfdId group, IfdId, const byte *pData, size_t size, ByteOrder)
Function to create a Casio2 makernote.
Definition: makernote_int.cpp:831
TiffComponent *(*)(uint16_t, IfdId, IfdId, const byte *, size_t, ByteOrder) NewMnFct
Type for a pointer to a function creating a makernote (image)
Definition: makernote_int.hpp:31
bool read(const byte *pData, size_t size, ByteOrder byteOrder) override
Read the header from a data buffer, return true if ok.
Definition: makernote_int.cpp:193
Header of an Olympus II Makernote.
Definition: makernote_int.hpp:163
size_t ifdOffset() const override
Return the offset to the start of the Makernote IFD from the start of the Makernote (= the start of t...
Definition: makernote_int.cpp:545
DataBuf nikonCrypt(uint16_t tag, const byte *pData, size_t size, TiffComponent *pRoot)
Encrypt and decrypt Nikon data.
Definition: makernote_int.cpp:920
int sonyMisc3cSelector(uint16_t, const byte *, size_t, TiffComponent *pRoot)
Function to select cfg + def of the SonyMisc3c (tag 9400) complex binary array.
Definition: makernote_int.cpp:1014
size_t baseOffset(size_t mnOffset) const override
Return the base offset for the makernote IFD entries relative to the start of the TIFF header...
Definition: makernote_int.cpp:378
size_t baseOffset(size_t mnOffset) const override
Return the base offset for the makernote IFD entries relative to the start of the TIFF header...
Definition: makernote_int.cpp:458
size_t write(IoWrapper &ioWrapper, ByteOrder byteOrder) const override
Write the header to a data buffer, return the number of bytes written.
Definition: makernote_int.cpp:526
PentaxMnHeader()
Default constructor.
Definition: makernote_int.cpp:485
size_t ifdOffset() const override
Return the offset to the start of the Makernote IFD from the start of the Makernote (= the start of t...
Definition: makernote_int.cpp:334
ByteOrder
Type to express the byte order (little or big endian)
Definition: types.hpp:34
Header of a Samsung Makernote, only used for the relative offset.
Definition: makernote_int.hpp:394
size_t size() const override
Return the size of the header (in bytes).
Definition: makernote_int.cpp:420
size_t write(IoWrapper &ioWrapper, ByteOrder byteOrder) const override
Write the header to a data buffer, return the number of bytes written.
Definition: makernote_int.cpp:349
Header of a Fujifilm Makernote.
Definition: makernote_int.hpp:219
bool read(const byte *pData, size_t size, ByteOrder byteOrder) override
Read the header from a data buffer, return true if ok.
Definition: makernote_int.cpp:304
size_t ifdOffset() const override
Return the offset to the start of the Makernote IFD from the start of the Makernote (= the start of t...
Definition: makernote_int.cpp:256
TiffComponent * newFujiMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte *, size_t size, ByteOrder)
Function to create a Fujifilm makernote.
Definition: makernote_int.cpp:694
size_t ifdOffset() const override
Return the offset to the start of the Makernote IFD from the start of the Makernote (= the start of t...
Definition: makernote_int.cpp:493
size_t ifdOffset() const override
Return the offset to the start of the Makernote IFD from the start of the Makernote (= the start of t...
Definition: makernote_int.cpp:579
Casio2MnHeader()
Default constructor.
Definition: makernote_int.cpp:606
Header of a Nikon 3 Makernote.
Definition: makernote_int.hpp:279
ByteOrder byteOrder() const override
Return the byte order for the makernote. If the return value is invalidByteOrder, this means that the...
Definition: makernote_int.cpp:618
virtual ByteOrder byteOrder() const
Return the byte order for the makernote. If the return value is invalidByteOrder, this means that the...
Definition: makernote_int.cpp:167
Header of a Nikon 2 Makernote.
Definition: makernote_int.hpp:251
size_t size() const override
Return the size of the header (in bytes).
Definition: makernote_int.cpp:575
TiffComponent *(*)(uint16_t tag, IfdId group, IfdId mnGroup) NewMnFct2
Type for a pointer to a function creating a makernote (group)
Definition: makernote_int.hpp:34
SigmaMnHeader()
Default constructor.
Definition: makernote_int.cpp:537
int sonyMisc2bSelector(uint16_t, const byte *, size_t, TiffComponent *pRoot)
Function to select cfg + def of the SonyMisc2b (tag 9404b) complex binary array.
Definition: makernote_int.cpp:987
virtual size_t size() const =0
Return the size of the header (in bytes).
TiffComponent * newPentaxMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create an Pentax makernote.
Definition: makernote_int.cpp:768
size_t size() const override
Return the size of the header (in bytes).
Definition: makernote_int.cpp:216
void setByteOrder(ByteOrder byteOrder) override
Set the byte order for the makernote.
Definition: makernote_int.cpp:406
static size_t sizeOfSignature()
Return the size of the makernote header signature.
Definition: makernote_int.cpp:244
size_t write(IoWrapper &ioWrapper, ByteOrder byteOrder) const override
Write the header to a data buffer, return the number of bytes written.
Definition: makernote_int.cpp:272
int nikonSelector(uint16_t tag, const byte *pData, size_t size, TiffComponent *)
Function to select cfg + def of a Nikon complex binary array.
Definition: makernote_int.cpp:910
size_t write(IoWrapper &ioWrapper, ByteOrder byteOrder) const override
Write the header to a data buffer, return the number of bytes written.
Definition: makernote_int.cpp:505
TiffComponent * newIfdMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a simple IFD makernote (Canon, Minolta, Nikon1)
Definition: makernote_int.cpp:649
uint8_t byte
1 byte unsigned integer type.
Definition: types.hpp:26
TiffComponent * newNikonMn(uint16_t tag, IfdId group, IfdId, const byte *pData, size_t size, ByteOrder)
Function to create a Nikon makernote. This will create the appropriate Nikon 1, 2 or 3 makernote...
Definition: makernote_int.cpp:706
Header of an Pentax DNG Makernote.
Definition: makernote_int.hpp:339
size_t baseOffset(size_t mnOffset) const override
Return the base offset for the makernote IFD entries relative to the start of the TIFF header...
Definition: makernote_int.cpp:260
size_t write(IoWrapper &ioWrapper, ByteOrder byteOrder) const override
Write the header to a data buffer, return the number of bytes written.
Definition: makernote_int.cpp:315
size_t baseOffset(size_t mnOffset) const override
Return the base offset for the makernote IFD entries relative to the start of the TIFF header...
Definition: makernote_int.cpp:300
size_t size() const override
Return the size of the header (in bytes).
Definition: makernote_int.cpp:610
size_t ifdOffset() const override
Return the offset to the start of the Makernote IFD from the start of the Makernote (= the start of t...
Definition: makernote_int.cpp:370
ByteOrder byteOrder() const override
Return the byte order for the makernote. If the return value is invalidByteOrder, this means that the...
Definition: makernote_int.cpp:296
Utility class containing a character array. All it does is to take care of memory allocation and dele...
Definition: types.hpp:124
Simple IO wrapper to ensure that the header is only written if there is any other data at all...
Definition: tiffcomposite_int.hpp:102
bool operator==(const std::string &key) const
Compare a TiffMnRegistry structure with a key being the make string from the image. The two are equal if TiffMnRegistry::make_ equals a substring of the key of the same size. E.g., registry = "OLYMPUS", key = "OLYMPUS OPTICAL CO.,LTD" (found in the image) match.
Definition: makernote_int.cpp:132
Header of a Sigma Makernote.
Definition: makernote_int.hpp:415
virtual size_t baseOffset(size_t mnOffset) const
Return the base offset for the makernote IFD entries relative to the start of the TIFF header...
Definition: makernote_int.cpp:171
PanasonicMnHeader()
Default constructor.
Definition: makernote_int.cpp:416
IfdId
Type to specify the IFD to which a metadata belongs.
Definition: tags.hpp:34
TiffComponent * newOlympusMn(uint16_t tag, IfdId group, IfdId, const byte *pData, size_t size, ByteOrder)
Function to create an Olympus makernote.
Definition: makernote_int.cpp:653
size_t ifdOffset() const override
Return the offset to the start of the Makernote IFD from the start of the Makernote (= the start of t...
Definition: makernote_int.cpp:292
static size_t sizeOfSignature()
Return the size of the makernote header signature.
Definition: makernote_int.cpp:567
std::string getExiv2ConfigPath()
Determine the path to the Exiv2 configuration file.
Definition: makernote_int.cpp:64
Interface class for components of a TIFF directory hierarchy (Composite pattern). Both TIFF directori...
Definition: tiffcomposite_int.hpp:152
size_t write(IoWrapper &ioWrapper, ByteOrder byteOrder) const override
Write the header to a data buffer, return the number of bytes written.
Definition: makernote_int.cpp:397
bool read(const byte *pData, size_t size, ByteOrder byteOrder) override
Read the header from a data buffer, return true if ok.
Definition: makernote_int.cpp:522
TiffComponent * newPentaxDngMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create an Pentax DNG makernote.
Definition: makernote_int.cpp:772
bool read(const byte *pData, size_t size, ByteOrder byteOrder) override
Read the header from a data buffer, return true if ok.
Definition: makernote_int.cpp:228
Header of an OM Digital Solutions (ex Olympus) Makernote.
Definition: makernote_int.hpp:191
TiffComponent * newOMSystemMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte *, size_t size, ByteOrder)
Function to create an OM Digital Solutions makernote.
Definition: makernote_int.cpp:682
size_t write(IoWrapper &ioWrapper, ByteOrder byteOrder) const override
Write the header to a data buffer, return the number of bytes written.
Definition: makernote_int.cpp:560
TiffComponent * newNikon2Mn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Nikon2 makernote.
Definition: makernote_int.cpp:731
size_t baseOffset(size_t mnOffset) const override
Return the base offset for the makernote IFD entries relative to the start of the TIFF header...
Definition: makernote_int.cpp:518
bool read(const byte *pData, size_t size, ByteOrder byteOrder) override
Read the header from a data buffer, return true if ok.
Definition: makernote_int.cpp:622
static size_t sizeOfSignature()
Return the size of the makernote header signature.
Definition: makernote_int.cpp:322
static size_t sizeOfSignature()
Return the size of the makernote header signature.
Definition: makernote_int.cpp:412
TiffComponent * newSigmaMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte *, size_t size, ByteOrder)
Function to create a Sigma makernote.
Definition: makernote_int.cpp:796
bool read(const byte *pData, size_t size, ByteOrder byteOrder) override
Read the header from a data buffer, return true if ok.
Definition: makernote_int.cpp:549
int sonyCsSelector(uint16_t, const byte *, size_t, TiffComponent *pRoot)
Function to select cfg + def of the Sony Camera Settings complex binary array.
Definition: makernote_int.cpp:961
Nikon2MnHeader()
Default constructor.
Definition: makernote_int.cpp:326
Header of a Panasonic Makernote.
Definition: makernote_int.hpp:311
static size_t sizeOfSignature()
Return the size of the makernote header signature.
Definition: makernote_int.cpp:177
TiffComponent * newPentaxMn(uint16_t tag, IfdId group, IfdId, const byte *pData, size_t size, ByteOrder)
Function to create an Pentax makernote.
Definition: makernote_int.cpp:751
OlympusMnHeader()
Default constructor.
Definition: makernote_int.cpp:181
static size_t sizeOfSignature()
Return the size of the makernote header signature.
Definition: makernote_int.cpp:481
virtual size_t write(IoWrapper &ioWrapper, ByteOrder byteOrder) const =0
Write the header to a data buffer, return the number of bytes written.
Header of an Olympus Makernote.
Definition: makernote_int.hpp:136
bool read(const byte *pData, size_t size, ByteOrder byteOrder) override
Read the header from a data buffer, return true if ok.
Definition: makernote_int.cpp:428
size_t write(IoWrapper &ioWrapper, ByteOrder byteOrder) const override
Write the header to a data buffer, return the number of bytes written.
Definition: makernote_int.cpp:594
size_t size() const override
Return the size of the header (in bytes).
Definition: makernote_int.cpp:514
Helper structure for the Matroska tags lookup table.
Definition: matroskavideo.hpp:39
TiffComponent * newSonyMn(uint16_t tag, IfdId group, IfdId, const byte *pData, size_t size, ByteOrder)
Function to create a Sony makernote.
Definition: makernote_int.cpp:808
TiffComponent * newPanasonicMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte *, size_t size, ByteOrder)
Function to create a Panasonic makernote.
Definition: makernote_int.cpp:739
Header of a Sony Makernote.
Definition: makernote_int.hpp:444
NewMnFct newMnFct_
Makernote create function (image)
Definition: makernote_int.hpp:54
int sony2010eSelector(uint16_t, const byte *, size_t, TiffComponent *pRoot)
Function to select cfg + def of the Sony 2010 Miscellaneous Information complex binary array...
Definition: makernote_int.cpp:971
Header of a Casio2 Makernote.
Definition: makernote_int.hpp:472
size_t size() const override
Return the size of the header (in bytes).
Definition: makernote_int.cpp:288
virtual void setByteOrder(ByteOrder byteOrder)
Set the byte order for the makernote.
Definition: makernote_int.cpp:160
TiffComponent * newSamsungMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Samsung makernote.
Definition: makernote_int.cpp:792
TiffMnCreator(const TiffComponent &)=delete
Prevent destruction (needed if used as a policy class)
EXIV2API ExifData::const_iterator make(const ExifData &ed)
Return the camera make.
Definition: easyaccess.cpp:333
size_t baseOffset(size_t mnOffset) const override
Return the base offset for the makernote IFD entries relative to the start of the TIFF header...
Definition: makernote_int.cpp:224
TiffComponent * newSony1Mn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Sony1 makernote.
Definition: makernote_int.cpp:823
size_t ifdOffset() const override
Return the offset to the start of the Makernote IFD from the start of the Makernote (= the start of t...
Definition: makernote_int.cpp:220
bool read(const byte *pData, size_t size, ByteOrder byteOrder) override
Read the header from a data buffer, return true if ok.
Definition: makernote_int.cpp:382
static size_t sizeOfSignature()
Return the size of the makernote header signature.
Definition: makernote_int.cpp:602
bool read(const byte *pData, size_t size, ByteOrder byteOrder) override
Read the header from a data buffer, return true if ok.
Definition: makernote_int.cpp:264
static size_t sizeOfSignature()
Return the size of the makernote header signature.
Definition: makernote_int.cpp:208
int sony2FpSelector(uint16_t, const byte *, size_t, TiffComponent *pRoot)
Function to select cfg + def of the Sony2Fp (tag 9402) complex binary array.
Definition: makernote_int.cpp:980
bool read(const byte *pData, size_t size, ByteOrder byteOrder) override
Read the header from a data buffer, return true if ok.
Definition: makernote_int.cpp:338
size_t write(IoWrapper &ioWrapper, ByteOrder byteOrder) const override
Write the header to a data buffer, return the number of bytes written.
Definition: makernote_int.cpp:439
TiffComponent * newCasio2Mn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Casio2 makernote.
Definition: makernote_int.cpp:841
size_t write(IoWrapper &ioWrapper, ByteOrder byteOrder) const override
Write the header to a data buffer, return the number of bytes written.
Definition: makernote_int.cpp:201
size_t ifdOffset() const override
Return the offset to the start of the Makernote IFD from the start of the Makernote (= the start of t...
Definition: makernote_int.cpp:189
IfdId mnGroup_
Group identifier.
Definition: makernote_int.hpp:53
size_t ifdOffset() const override
Return the offset to the start of the Makernote IFD from the start of the Makernote (= the start of t...
Definition: makernote_int.cpp:424
TiffComponent * newSamsungMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte *pData, size_t size, ByteOrder)
Function to create a Samsung makernote.
Definition: makernote_int.cpp:776
static size_t sizeOfSignature()
Return the size of the makernote header signature.
Definition: makernote_int.cpp:280
Makernote header interface. This class is used with TIFF makernotes.
Definition: makernote_int.hpp:92
size_t size() const override
Return the size of the header (in bytes).
Definition: makernote_int.cpp:489
static size_t sizeOfSignature()
Return the size of the makernote header signature.
Definition: makernote_int.cpp:446
Makernote registry structure.
Definition: makernote_int.hpp:37
size_t write(IoWrapper &ioWrapper, ByteOrder byteOrder) const override
Write the header to a data buffer, return the number of bytes written.
Definition: makernote_int.cpp:633
TiffComponent * newOMSystemMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create an OM Digital Solutions makernote.
Definition: makernote_int.cpp:690
bool read(const byte *pData, size_t size, ByteOrder byteOrder) override
Read the header from a data buffer, return true if ok.
Definition: makernote_int.cpp:583
Olympus2MnHeader()
Default constructor.
Definition: makernote_int.cpp:212
TiffComponent * newIfdMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte *, size_t size, ByteOrder)
Function to create a simple IFD makernote (Canon, Minolta, Nikon1)
Definition: makernote_int.cpp:641
size_t size() const override
Return the size of the header (in bytes).
Definition: makernote_int.cpp:252
TIFF makernote factory for concrete TIFF makernotes.
Definition: makernote_int.hpp:61
TiffComponent * newSony2Mn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Sony2 makernote.
Definition: makernote_int.cpp:827
virtual bool read(const byte *pData, size_t size, ByteOrder byteOrder)=0
Read the header from a data buffer, return true if ok.
TiffComponent * newSigmaMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Sigma makernote.
Definition: makernote_int.cpp:804
static size_t sizeOfSignature()
Return the size of the makernote header signature.
Definition: makernote_int.cpp:533
Header of an Pentax Makernote.
Definition: makernote_int.hpp:367
static TiffComponent * create(uint16_t tag, IfdId group, const std::string &make, const byte *pData, size_t size, ByteOrder byteOrder)
Create the Makernote for camera make and details from the makernote entry itself if needed...
Definition: makernote_int.cpp:143
NewMnFct2 newMnFct2_
Makernote create function (group)
Definition: makernote_int.hpp:55
Nikon3MnHeader()
Default constructor.
Definition: makernote_int.cpp:361
static size_t sizeOfSignature()
Return the size of the makernote header signature.
Definition: makernote_int.cpp:357
size_t size() const override
Return the size of the header (in bytes).
Definition: makernote_int.cpp:185
ByteOrder byteOrder() const override
Return the byte order for the makernote. If the return value is invalidByteOrder, this means that the...
Definition: makernote_int.cpp:374
SamsungMnHeader()
Default constructor.
Definition: makernote_int.cpp:510
virtual size_t ifdOffset() const
Return the offset to the start of the Makernote IFD from the start of the Makernote (= the start of t...
Definition: makernote_int.cpp:163
TiffComponent * newOlympusMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create an Olympus makernote.
Definition: makernote_int.cpp:674
OMSystemMnHeader()
Default constructor.
Definition: makernote_int.cpp:248
FujiMnHeader()
Default constructor.
Definition: makernote_int.cpp:284
TiffComponent * newPanasonicMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Panasonic makernote.
Definition: makernote_int.cpp:747
size_t size() const override
Return the size of the header (in bytes).
Definition: makernote_int.cpp:454
size_t ifdOffset() const override
Return the offset to the start of the Makernote IFD from the start of the Makernote (= the start of t...
Definition: makernote_int.cpp:462
SonyMnHeader()
Default constructor.
Definition: makernote_int.cpp:571
size_t size() const override
Return the size of the header (in bytes).
Definition: makernote_int.cpp:541
bool read(const byte *pData, size_t size, ByteOrder byteOrder) override
Read the header from a data buffer, return true if ok.
Definition: makernote_int.cpp:466
TiffComponent * newFujiMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Fujifilm makernote.
Definition: makernote_int.cpp:702
virtual ~MnHeader()=default
Virtual destructor.
TiffComponent * newOlympus2Mn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create an Olympus II makernote.
Definition: makernote_int.cpp:678
TiffComponent * newNikon3Mn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Nikon3 makernote.
Definition: makernote_int.cpp:735