Exiv2
makernote_int.hpp
1 // ***************************************************************** -*- C++ -*-
2 /*
3  * Copyright (C) 2004-2021 Exiv2 authors
4  * This program is part of the Exiv2 distribution.
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2
9  * of the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
19  */
20 #ifndef MAKERNOTE_INT_HPP_
21 #define MAKERNOTE_INT_HPP_
22 
23 // *****************************************************************************
24 // included header files
25 #include "tifffwd_int.hpp"
26 #include "tags_int.hpp"
27 #include "ini.hpp"
28 #include "types.hpp"
29 
30 // + standard includes
31 #include <string>
32 
33 // *****************************************************************************
34 // namespace extensions
35 namespace Exiv2 {
36  namespace Internal {
37 // *****************************************************************************
38 // function prototypes
42  std::string getExiv2ConfigPath();
43 
47  std::string readExiv2Config(const std::string& section,const std::string& value,const std::string& def);
48 
49 
50 // *****************************************************************************
51 // class definitions
52 
54  typedef TiffComponent* (*NewMnFct)(uint16_t tag,
55  IfdId group,
56  IfdId mnGroup,
57  const byte* pData,
58  uint32_t size,
59  ByteOrder byteOrder);
60 
62  typedef TiffComponent* (*NewMnFct2)(uint16_t tag,
63  IfdId group,
64  IfdId mnGroup);
65 
67  struct TiffMnRegistry {
68  struct MakeKey;
76  bool operator==(const std::string& key) const;
77 
79  bool operator==(IfdId key) const;
80 
81  // DATA
82  const char* make_;
86  };
87 
91  class TiffMnCreator {
92  public:
104  static TiffComponent* create(uint16_t tag,
105  IfdId group,
106  const std::string& make,
107  const byte* pData,
108  uint32_t size,
109  ByteOrder byteOrder);
114  static TiffComponent* create(uint16_t tag,
115  IfdId group,
116  IfdId mnGroup);
117 
118  protected:
121  private:
122  static const TiffMnRegistry registry_[]; //<! List of makernotes
123  }; // class TiffMnCreator
124 
126  class MnHeader {
127  public:
129 
130  virtual ~MnHeader();
133 
135  virtual bool read(const byte* pData,
137  uint32_t size,
138  ByteOrder byteOrder) =0;
142  virtual void setByteOrder(ByteOrder byteOrder);
144 
146  virtual uint32_t size() const =0;
149  virtual uint32_t write(IoWrapper& ioWrapper,
150  ByteOrder byteOrder) const =0;
155  virtual uint32_t ifdOffset() const;
161  virtual ByteOrder byteOrder() const;
167  virtual uint32_t baseOffset(uint32_t mnOffset) const;
169 
170  }; // class MnHeader
171 
173  class OlympusMnHeader : public MnHeader {
174  public:
176 
177  OlympusMnHeader();
180  virtual ~OlympusMnHeader();
182 
184  virtual bool read(const byte* pData,
185  uint32_t size,
188 
190  virtual uint32_t size() const;
191  virtual uint32_t write(IoWrapper& ioWrapper, ByteOrder byteOrder) const;
192  virtual uint32_t ifdOffset() const;
194  static uint32_t sizeOfSignature();
196 
197  private:
198  DataBuf header_;
199  static const byte signature_[];
200 
201  }; // class OlympusMnHeader
202 
204  class Olympus2MnHeader : public MnHeader {
205  public:
207 
211  virtual ~Olympus2MnHeader();
213 
215  virtual bool read(const byte* pData,
216  uint32_t size,
219 
221  virtual uint32_t size() const;
222  virtual uint32_t write(IoWrapper& ioWrapper, ByteOrder byteOrder) const;
223  virtual uint32_t ifdOffset() const;
224  virtual uint32_t baseOffset(uint32_t mnOffset) const;
226  static uint32_t sizeOfSignature();
228 
229  private:
230  DataBuf header_;
231  static const byte signature_[];
232 
233  }; // class Olympus2MnHeader
234 
236  class OMSystemMnHeader : public MnHeader {
237  public:
239 
243  virtual ~OMSystemMnHeader();
245 
247  virtual bool read(const byte* pData,
248  uint32_t size,
251 
253  virtual uint32_t size() const;
254  virtual uint32_t write(IoWrapper& ioWrapper, ByteOrder byteOrder) const;
255  virtual uint32_t ifdOffset() const;
256  virtual uint32_t baseOffset(uint32_t mnOffset) const;
258  static uint32_t sizeOfSignature();
260 
261  private:
262  DataBuf header_;
263  static const byte signature_[];
264 
265  }; // class OMSystemMnHeader
266 
268  class FujiMnHeader : public MnHeader {
269  public:
271 
272  FujiMnHeader();
275  virtual ~FujiMnHeader();
277 
279  virtual bool read(const byte* pData,
280  uint32_t size,
282  // setByteOrder not implemented
284 
286  virtual uint32_t size() const;
287  virtual uint32_t write(IoWrapper& ioWrapper, ByteOrder byteOrder) const;
288  virtual uint32_t ifdOffset() const;
289  virtual ByteOrder byteOrder() const;
290  virtual uint32_t baseOffset(uint32_t mnOffset) const;
292  static uint32_t sizeOfSignature();
294 
295  private:
296  DataBuf header_;
297  static const byte signature_[];
298  static const ByteOrder byteOrder_;
299  uint32_t start_;
300 
301  }; // class FujiMnHeader
302 
304  class Nikon2MnHeader : public MnHeader {
305  public:
307 
308  Nikon2MnHeader();
311  virtual ~Nikon2MnHeader();
313 
315  virtual bool read(const byte* pData,
316  uint32_t size,
319 
321  virtual uint32_t size() const;
322  virtual uint32_t write(IoWrapper& ioWrapper, ByteOrder byteOrder) const;
323  virtual uint32_t ifdOffset() const;
325  static uint32_t sizeOfSignature();
327 
328  private:
329  DataBuf buf_;
330  uint32_t start_;
331  static const byte signature_[];
332 
333  }; // class Nikon2MnHeader
334 
336  class Nikon3MnHeader : public MnHeader {
337  public:
339 
340  Nikon3MnHeader();
343  virtual ~Nikon3MnHeader();
345 
347  virtual bool read(const byte* pData,
348  uint32_t size,
350  virtual void setByteOrder(ByteOrder byteOrder);
352 
354  virtual uint32_t size() const;
355  virtual uint32_t write(IoWrapper& ioWrapper, ByteOrder byteOrder) const;
356  virtual uint32_t ifdOffset() const;
357  virtual ByteOrder byteOrder() const;
358  virtual uint32_t baseOffset(uint32_t mnOffset) const;
360  static uint32_t sizeOfSignature();
362 
363  private:
364  DataBuf buf_;
365  ByteOrder byteOrder_;
366  uint32_t start_;
367  static const byte signature_[];
368 
369  }; // class Nikon3MnHeader
370 
372  class PanasonicMnHeader : public MnHeader {
373  public:
375 
379  virtual ~PanasonicMnHeader();
381 
383  virtual bool read(const byte* pData,
384  uint32_t size,
387 
389  virtual uint32_t size() const;
390  virtual uint32_t write(IoWrapper& ioWrapper, ByteOrder byteOrder) const;
391  virtual uint32_t ifdOffset() const;
393  static uint32_t sizeOfSignature();
395 
396  private:
397  DataBuf buf_;
398  uint32_t start_;
399  static const byte signature_[];
400 
401  }; // class PanasonicMnHeader
402 
404  class PentaxDngMnHeader : public MnHeader {
405  public:
407 
411  virtual ~PentaxDngMnHeader();
413 
415  virtual bool read(const byte* pData,
416  uint32_t size,
419 
421  virtual uint32_t size() const;
422  virtual uint32_t write(IoWrapper& ioWrapper, ByteOrder byteOrder) const;
423  virtual uint32_t ifdOffset() const;
424  virtual uint32_t baseOffset(uint32_t mnOffset) const;
426  static uint32_t sizeOfSignature();
428 
429  private:
430  DataBuf header_;
431  static const byte signature_[];
432 
433  }; // class PentaxDngMnHeader
434 
436  class PentaxMnHeader : public MnHeader {
437  public:
439 
440  PentaxMnHeader();
443  virtual ~PentaxMnHeader();
445 
447  virtual bool read(const byte* pData,
448  uint32_t size,
451 
453  virtual uint32_t size() const;
454  virtual uint32_t write(IoWrapper& ioWrapper, ByteOrder byteOrder) const;
455  virtual uint32_t ifdOffset() const;
457  static uint32_t sizeOfSignature();
459 
460  private:
461  DataBuf header_;
462  static const byte signature_[];
463 
464  }; // class PentaxMnHeader
465 
467  class SamsungMnHeader : public MnHeader {
468  public:
470 
471  SamsungMnHeader();
474 
476  virtual bool read(const byte* pData,
477  uint32_t size,
480 
482  virtual uint32_t size() const;
483  virtual uint32_t write(IoWrapper& ioWrapper, ByteOrder byteOrder) const;
484  virtual uint32_t baseOffset(uint32_t mnOffset) const;
486 
487  }; // class SamsungMnHeader
488 
490  class SigmaMnHeader : public MnHeader {
491  public:
493 
494  SigmaMnHeader();
497  virtual ~SigmaMnHeader();
499 
501  virtual bool read(const byte* pData,
502  uint32_t size,
505 
507  virtual uint32_t size() const;
508  virtual uint32_t write(IoWrapper& ioWrapper, ByteOrder byteOrder) const;
509  virtual uint32_t ifdOffset() const;
511  static uint32_t sizeOfSignature();
513 
514  private:
515  DataBuf buf_;
516  uint32_t start_;
517  static const byte signature1_[];
518  static const byte signature2_[];
519 
520  }; // class SigmaMnHeader
521 
523  class SonyMnHeader : public MnHeader {
524  public:
526 
527  SonyMnHeader();
530  virtual ~SonyMnHeader();
532 
534  virtual bool read(const byte* pData,
535  uint32_t size,
538 
540  virtual uint32_t size() const;
541  virtual uint32_t write(IoWrapper& ioWrapper, ByteOrder byteOrder) const;
542  virtual uint32_t ifdOffset() const;
544  static uint32_t sizeOfSignature();
546 
547  private:
548  DataBuf buf_;
549  uint32_t start_;
550  static const byte signature_[];
551 
552  }; // class SonyMnHeader
553 
555  class Casio2MnHeader : public MnHeader {
556  public:
558 
559  Casio2MnHeader();
562  virtual ~Casio2MnHeader();
564 
566  virtual bool read(const byte* pData,
567  uint32_t size,
570 
572  virtual uint32_t size() const;
573  virtual uint32_t write(IoWrapper& ioWrapper, ByteOrder byteOrder) const;
574  virtual uint32_t ifdOffset() const;
575  virtual ByteOrder byteOrder() const;
577  static uint32_t sizeOfSignature();
579 
580  private:
581  DataBuf buf_;
582  uint32_t start_;
583  static const byte signature_[];
584  static const ByteOrder byteOrder_;
585 
586  }; // class Casio2MnHeader
587 
588  // *****************************************************************************
589 // template, inline and free functions
590 
592  TiffComponent* newIfdMn(uint16_t tag,
593  IfdId group,
594  IfdId mnGroup,
595  const byte* pData,
596  uint32_t size,
597  ByteOrder byteOrder);
598 
600  TiffComponent* newIfdMn2(uint16_t tag,
601  IfdId group,
602  IfdId mnGroup);
603 
605  TiffComponent* newOlympusMn(uint16_t tag,
606  IfdId group,
607  IfdId mnGroup,
608  const byte* pData,
609  uint32_t size,
610  ByteOrder byteOrder);
611 
613  TiffComponent* newOlympusMn2(uint16_t tag,
614  IfdId group,
615  IfdId mnGroup);
616 
618  TiffComponent* newOlympus2Mn2(uint16_t tag,
619  IfdId group,
620  IfdId mnGroup);
621 
623  TiffComponent* newOMSystemMn(uint16_t tag,
624  IfdId group,
625  IfdId mnGroup,
626  const byte* pData,
627  uint32_t size,
628  ByteOrder byteOrder);
629 
631  TiffComponent* newOMSystemMn2(uint16_t tag,
632  IfdId group,
633  IfdId mnGroup);
634 
636  TiffComponent* newFujiMn(uint16_t tag,
637  IfdId group,
638  IfdId mnGroup,
639  const byte* pData,
640  uint32_t size,
641  ByteOrder byteOrder);
642 
644  TiffComponent* newFujiMn2(uint16_t tag,
645  IfdId group,
646  IfdId mnGroup);
647 
652  TiffComponent* newNikonMn(uint16_t tag,
653  IfdId group,
654  IfdId mnGroup,
655  const byte* pData,
656  uint32_t size,
657  ByteOrder byteOrder);
658 
660  TiffComponent* newNikon2Mn2(uint16_t tag,
661  IfdId group,
662  IfdId mnGroup);
663 
665  TiffComponent* newNikon3Mn2(uint16_t tag,
666  IfdId group,
667  IfdId mnGroup);
668 
670  TiffComponent* newPanasonicMn(uint16_t tag,
671  IfdId group,
672  IfdId mnGroup,
673  const byte* pData,
674  uint32_t size,
675  ByteOrder byteOrder);
676 
678  TiffComponent* newPanasonicMn2(uint16_t tag,
679  IfdId group,
680  IfdId mnGroup);
681 
683  TiffComponent* newPentaxMn(uint16_t tag,
684  IfdId group,
685  IfdId mnGroup,
686  const byte* pData,
687  uint32_t size,
688  ByteOrder byteOrder);
689 
691  TiffComponent* newPentaxMn2(uint16_t tag,
692  IfdId group,
693  IfdId mnGroup);
694 
696  TiffComponent* newPentaxDngMn2(uint16_t tag,
697  IfdId group,
698  IfdId mnGroup);
699 
701  TiffComponent* newSamsungMn(uint16_t tag,
702  IfdId group,
703  IfdId mnGroup,
704  const byte* pData,
705  uint32_t size,
706  ByteOrder byteOrder);
707 
709  TiffComponent* newSamsungMn2(uint16_t tag,
710  IfdId group,
711  IfdId mnGroup);
712 
714  TiffComponent* newSigmaMn(uint16_t tag,
715  IfdId group,
716  IfdId mnGroup,
717  const byte* pData,
718  uint32_t size,
719  ByteOrder byteOrder);
720 
722  TiffComponent* newSigmaMn2(uint16_t tag,
723  IfdId group,
724  IfdId mnGroup);
725 
727  TiffComponent* newSonyMn(uint16_t tag,
728  IfdId group,
729  IfdId mnGroup,
730  const byte* pData,
731  uint32_t size,
732  ByteOrder byteOrder);
733 
735  TiffComponent* newSony1Mn2(uint16_t tag,
736  IfdId group,
737  IfdId mnGroup);
738 
740  TiffComponent* newSony2Mn2(uint16_t tag,
741  IfdId group,
742  IfdId mnGroup);
743 
745  TiffComponent* newCasioMn(uint16_t tag,
746  IfdId group,
747  IfdId mnGroup,
748  const byte* pData,
749  uint32_t size,
750  ByteOrder byteOrder);
751 
753  TiffComponent* newCasio2Mn2(uint16_t tag,
754  IfdId group,
755  IfdId mnGroup);
756 
766  int sonyCsSelector(uint16_t tag, const byte* pData, uint32_t size, TiffComponent* const pRoot);
767 
777  int sony2010eSelector(uint16_t tag, const byte* pData, uint32_t size, TiffComponent* const pRoot);
778 
788  int nikonSelector(uint16_t tag, const byte* pData, uint32_t size, TiffComponent* const pRoot);
789 
799  int nikonAf2Selector(uint16_t tag, const byte* pData, uint32_t size, TiffComponent* const pRoot);
800 
817  DataBuf nikonCrypt(uint16_t tag, const byte* pData, uint32_t size, TiffComponent* const pRoot);
818 
819 }} // namespace Internal, Exiv2
820 
821 #endif // #ifndef MAKERNOTE_INT_HPP_
Utility class containing a character array. All it does is to take care of memory allocation and dele...
Definition: types.hpp:193
Header of a Casio2 Makernote.
Definition: makernote_int.hpp:555
virtual uint32_t size() const
Return the size of the header (in bytes).
Definition: makernote_int.cpp:870
virtual ~Casio2MnHeader()
Virtual destructor.
Definition: makernote_int.cpp:866
virtual uint32_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:875
virtual uint32_t write(IoWrapper &ioWrapper, ByteOrder byteOrder) const
Write the header to a data buffer, return the number of bytes written.
Definition: makernote_int.cpp:897
virtual bool read(const byte *pData, uint32_t size, ByteOrder byteOrder)
Read the header from a data buffer, return true if ok.
Definition: makernote_int.cpp:885
static uint32_t sizeOfSignature()
Return the size of the makernote header signature.
Definition: makernote_int.cpp:856
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:880
Casio2MnHeader()
Default constructor.
Definition: makernote_int.cpp:861
Header of a Fujifilm Makernote.
Definition: makernote_int.hpp:268
virtual uint32_t baseOffset(uint32_t mnOffset) const
Return the base offset for the makernote IFD entries relative to the start of the TIFF header....
Definition: makernote_int.cpp:422
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:417
FujiMnHeader()
Default constructor.
Definition: makernote_int.cpp:398
virtual ~FujiMnHeader()
Virtual destructor.
Definition: makernote_int.cpp:403
virtual uint32_t size() const
Return the size of the header (in bytes).
Definition: makernote_int.cpp:407
virtual uint32_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:412
static uint32_t sizeOfSignature()
Return the size of the makernote header signature.
Definition: makernote_int.cpp:393
virtual bool read(const byte *pData, uint32_t size, ByteOrder byteOrder)
Read the header from a data buffer, return true if ok.
Definition: makernote_int.cpp:427
virtual uint32_t write(IoWrapper &ioWrapper, ByteOrder byteOrder) const
Write the header to a data buffer, return the number of bytes written.
Definition: makernote_int.cpp:444
Simple IO wrapper to ensure that the header is only written if there is any other data at all.
Definition: tiffcomposite_int.hpp:121
Makernote header interface. This class is used with TIFF makernotes.
Definition: makernote_int.hpp:126
virtual uint32_t write(IoWrapper &ioWrapper, ByteOrder byteOrder) const =0
Write the header to a data buffer, return the number of bytes written.
virtual void setByteOrder(ByteOrder byteOrder)
Set the byte order for the makernote.
Definition: makernote_int.cpp:212
virtual bool read(const byte *pData, uint32_t size, ByteOrder byteOrder)=0
Read the header from a data buffer, return true if ok.
virtual ~MnHeader()
Virtual destructor.
Definition: makernote_int.cpp:208
virtual uint32_t baseOffset(uint32_t mnOffset) const
Return the base offset for the makernote IFD entries relative to the start of the TIFF header....
Definition: makernote_int.cpp:226
virtual uint32_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:216
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:221
virtual uint32_t size() const =0
Return the size of the header (in bytes).
Header of a Nikon 2 Makernote.
Definition: makernote_int.hpp:304
virtual ~Nikon2MnHeader()
Virtual destructor.
Definition: makernote_int.cpp:465
virtual uint32_t write(IoWrapper &ioWrapper, ByteOrder byteOrder) const
Write the header to a data buffer, return the number of bytes written.
Definition: makernote_int.cpp:491
Nikon2MnHeader()
Default constructor.
Definition: makernote_int.cpp:460
virtual uint32_t size() const
Return the size of the header (in bytes).
Definition: makernote_int.cpp:469
static uint32_t sizeOfSignature()
Return the size of the makernote header signature.
Definition: makernote_int.cpp:455
virtual uint32_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:474
virtual bool read(const byte *pData, uint32_t size, ByteOrder byteOrder)
Read the header from a data buffer, return true if ok.
Definition: makernote_int.cpp:479
Header of a Nikon 3 Makernote.
Definition: makernote_int.hpp:336
virtual uint32_t size() const
Return the size of the header (in bytes).
Definition: makernote_int.cpp:520
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:530
Nikon3MnHeader()
Default constructor.
Definition: makernote_int.cpp:508
virtual bool read(const byte *pData, uint32_t size, ByteOrder byteOrder)
Read the header from a data buffer, return true if ok.
Definition: makernote_int.cpp:540
virtual uint32_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:525
virtual uint32_t baseOffset(uint32_t mnOffset) const
Return the base offset for the makernote IFD entries relative to the start of the TIFF header....
Definition: makernote_int.cpp:535
virtual ~Nikon3MnHeader()
Virtual destructor.
Definition: makernote_int.cpp:516
virtual uint32_t write(IoWrapper &ioWrapper, ByteOrder byteOrder) const
Write the header to a data buffer, return the number of bytes written.
Definition: makernote_int.cpp:555
virtual void setByteOrder(ByteOrder byteOrder)
Set the byte order for the makernote.
Definition: makernote_int.cpp:569
static uint32_t sizeOfSignature()
Return the size of the makernote header signature.
Definition: makernote_int.cpp:503
Header of an OM Digital Solutions (ex Olympus) Makernote.
Definition: makernote_int.hpp:236
virtual uint32_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:357
OMSystemMnHeader()
Default constructor.
Definition: makernote_int.cpp:343
static uint32_t sizeOfSignature()
Return the size of the makernote header signature.
Definition: makernote_int.cpp:338
virtual ~OMSystemMnHeader()
Virtual destructor.
Definition: makernote_int.cpp:348
virtual uint32_t write(IoWrapper &ioWrapper, ByteOrder byteOrder) const
Write the header to a data buffer, return the number of bytes written.
Definition: makernote_int.cpp:381
virtual bool read(const byte *pData, uint32_t size, ByteOrder byteOrder)
Read the header from a data buffer, return true if ok.
Definition: makernote_int.cpp:367
virtual uint32_t baseOffset(uint32_t mnOffset) const
Return the base offset for the makernote IFD entries relative to the start of the TIFF header....
Definition: makernote_int.cpp:362
virtual uint32_t size() const
Return the size of the header (in bytes).
Definition: makernote_int.cpp:352
Header of an Olympus II Makernote.
Definition: makernote_int.hpp:204
virtual uint32_t write(IoWrapper &ioWrapper, ByteOrder byteOrder) const
Write the header to a data buffer, return the number of bytes written.
Definition: makernote_int.cpp:327
virtual bool read(const byte *pData, uint32_t size, ByteOrder byteOrder)
Read the header from a data buffer, return true if ok.
Definition: makernote_int.cpp:313
virtual uint32_t baseOffset(uint32_t mnOffset) const
Return the base offset for the makernote IFD entries relative to the start of the TIFF header....
Definition: makernote_int.cpp:308
virtual uint32_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:303
virtual uint32_t size() const
Return the size of the header (in bytes).
Definition: makernote_int.cpp:298
Olympus2MnHeader()
Default constructor.
Definition: makernote_int.cpp:289
static uint32_t sizeOfSignature()
Return the size of the makernote header signature.
Definition: makernote_int.cpp:284
virtual ~Olympus2MnHeader()
Virtual destructor.
Definition: makernote_int.cpp:294
Header of an Olympus Makernote.
Definition: makernote_int.hpp:173
static uint32_t sizeOfSignature()
Return the size of the makernote header signature.
Definition: makernote_int.cpp:235
virtual uint32_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:254
virtual bool read(const byte *pData, uint32_t size, ByteOrder byteOrder)
Read the header from a data buffer, return true if ok.
Definition: makernote_int.cpp:259
virtual uint32_t write(IoWrapper &ioWrapper, ByteOrder byteOrder) const
Write the header to a data buffer, return the number of bytes written.
Definition: makernote_int.cpp:273
OlympusMnHeader()
Default constructor.
Definition: makernote_int.cpp:240
virtual uint32_t size() const
Return the size of the header (in bytes).
Definition: makernote_int.cpp:249
virtual ~OlympusMnHeader()
Virtual destructor.
Definition: makernote_int.cpp:245
Header of a Panasonic Makernote.
Definition: makernote_int.hpp:372
virtual uint32_t write(IoWrapper &ioWrapper, ByteOrder byteOrder) const
Write the header to a data buffer, return the number of bytes written.
Definition: makernote_int.cpp:614
virtual ~PanasonicMnHeader()
Virtual destructor.
Definition: makernote_int.cpp:588
PanasonicMnHeader()
Default constructor.
Definition: makernote_int.cpp:583
virtual uint32_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:597
virtual bool read(const byte *pData, uint32_t size, ByteOrder byteOrder)
Read the header from a data buffer, return true if ok.
Definition: makernote_int.cpp:602
static uint32_t sizeOfSignature()
Return the size of the makernote header signature.
Definition: makernote_int.cpp:578
virtual uint32_t size() const
Return the size of the header (in bytes).
Definition: makernote_int.cpp:592
Header of an Pentax DNG Makernote.
Definition: makernote_int.hpp:404
PentaxDngMnHeader()
Default constructor.
Definition: makernote_int.cpp:630
virtual uint32_t write(IoWrapper &ioWrapper, ByteOrder byteOrder) const
Write the header to a data buffer, return the number of bytes written.
Definition: makernote_int.cpp:668
virtual bool read(const byte *pData, uint32_t size, ByteOrder byteOrder)
Read the header from a data buffer, return true if ok.
Definition: makernote_int.cpp:654
virtual uint32_t baseOffset(uint32_t mnOffset) const
Return the base offset for the makernote IFD entries relative to the start of the TIFF header....
Definition: makernote_int.cpp:644
virtual ~PentaxDngMnHeader()
Virtual destructor.
Definition: makernote_int.cpp:635
virtual uint32_t size() const
Return the size of the header (in bytes).
Definition: makernote_int.cpp:639
static uint32_t sizeOfSignature()
Return the size of the makernote header signature.
Definition: makernote_int.cpp:625
virtual uint32_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:649
Header of an Pentax Makernote.
Definition: makernote_int.hpp:436
virtual bool read(const byte *pData, uint32_t size, ByteOrder byteOrder)
Read the header from a data buffer, return true if ok.
Definition: makernote_int.cpp:703
virtual uint32_t size() const
Return the size of the header (in bytes).
Definition: makernote_int.cpp:693
static uint32_t sizeOfSignature()
Return the size of the makernote header signature.
Definition: makernote_int.cpp:679
virtual ~PentaxMnHeader()
Virtual destructor.
Definition: makernote_int.cpp:689
virtual uint32_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:698
virtual uint32_t write(IoWrapper &ioWrapper, ByteOrder byteOrder) const
Write the header to a data buffer, return the number of bytes written.
Definition: makernote_int.cpp:717
PentaxMnHeader()
Default constructor.
Definition: makernote_int.cpp:684
Header of a Samsung Makernote, only used for the relative offset.
Definition: makernote_int.hpp:467
SamsungMnHeader()
Default constructor.
Definition: makernote_int.cpp:724
virtual uint32_t write(IoWrapper &ioWrapper, ByteOrder byteOrder) const
Write the header to a data buffer, return the number of bytes written.
Definition: makernote_int.cpp:746
virtual bool read(const byte *pData, uint32_t size, ByteOrder byteOrder)
Read the header from a data buffer, return true if ok.
Definition: makernote_int.cpp:739
virtual uint32_t baseOffset(uint32_t mnOffset) const
Return the base offset for the makernote IFD entries relative to the start of the TIFF header....
Definition: makernote_int.cpp:734
virtual uint32_t size() const
Return the size of the header (in bytes).
Definition: makernote_int.cpp:729
Header of a Sigma Makernote.
Definition: makernote_int.hpp:490
virtual uint32_t write(IoWrapper &ioWrapper, ByteOrder byteOrder) const
Write the header to a data buffer, return the number of bytes written.
Definition: makernote_int.cpp:797
virtual uint32_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:779
virtual ~SigmaMnHeader()
Virtual destructor.
Definition: makernote_int.cpp:770
static uint32_t sizeOfSignature()
Return the size of the makernote header signature.
Definition: makernote_int.cpp:759
virtual uint32_t size() const
Return the size of the header (in bytes).
Definition: makernote_int.cpp:774
SigmaMnHeader()
Default constructor.
Definition: makernote_int.cpp:765
virtual bool read(const byte *pData, uint32_t size, ByteOrder byteOrder)
Read the header from a data buffer, return true if ok.
Definition: makernote_int.cpp:784
Header of a Sony Makernote.
Definition: makernote_int.hpp:523
SonyMnHeader()
Default constructor.
Definition: makernote_int.cpp:813
virtual ~SonyMnHeader()
Virtual destructor.
Definition: makernote_int.cpp:818
static uint32_t sizeOfSignature()
Return the size of the makernote header signature.
Definition: makernote_int.cpp:808
virtual uint32_t write(IoWrapper &ioWrapper, ByteOrder byteOrder) const
Write the header to a data buffer, return the number of bytes written.
Definition: makernote_int.cpp:844
virtual uint32_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:827
virtual bool read(const byte *pData, uint32_t size, ByteOrder byteOrder)
Read the header from a data buffer, return true if ok.
Definition: makernote_int.cpp:832
virtual uint32_t size() const
Return the size of the header (in bytes).
Definition: makernote_int.cpp:822
Interface class for components of a TIFF directory hierarchy (Composite pattern). Both TIFF directori...
Definition: tiffcomposite_int.hpp:171
TIFF makernote factory for concrete TIFF makernotes.
Definition: makernote_int.hpp:91
~TiffMnCreator()
Prevent destruction (needed if used as a policy class)
Definition: makernote_int.hpp:120
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:167
int nikonSelector(uint16_t tag, const byte *pData, uint32_t size, TiffComponent *const)
Function to select cfg + def of a Nikon complex binary array.
Definition: makernote_int.cpp:1258
TiffComponent * newSigmaMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte *, uint32_t size, ByteOrder)
Function to create a Sigma makernote.
Definition: makernote_int.cpp:1119
TiffComponent * newPanasonicMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Panasonic makernote.
Definition: makernote_int.cpp:1052
TiffComponent * newFujiMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte *, uint32_t size, ByteOrder)
Function to create a Fujifilm makernote.
Definition: makernote_int.cpp:977
TiffComponent * newSony2Mn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Sony2 makernote.
Definition: makernote_int.cpp:1164
TiffComponent * newOlympus2Mn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create an Olympus II makernote.
Definition: makernote_int.cpp:951
TiffComponent * newFujiMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Fujifilm makernote.
Definition: makernote_int.cpp:989
int sonyCsSelector(uint16_t, const byte *, uint32_t, TiffComponent *const pRoot)
Function to select cfg + def of the Sony Camera Settings complex binary array.
Definition: makernote_int.cpp:1312
TiffComponent * newSonyMn(uint16_t tag, IfdId group, IfdId, const byte *pData, uint32_t size, ByteOrder)
Function to create a Sony makernote.
Definition: makernote_int.cpp:1138
TiffComponent * newPanasonicMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte *, uint32_t size, ByteOrder)
Function to create a Panasonic makernote.
Definition: makernote_int.cpp:1040
int sony2010eSelector(uint16_t, const byte *, uint32_t, TiffComponent *const pRoot)
Function to select cfg + def of the Sony 2010 Miscellaneous Information complex binary array.
Definition: makernote_int.cpp:1323
TiffComponent * newNikon3Mn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Nikon3 makernote.
Definition: makernote_int.cpp:1033
TiffComponent * newOMSystemMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a OM Digital Solutions makernote.
Definition: makernote_int.cpp:970
DataBuf nikonCrypt(uint16_t tag, const byte *pData, uint32_t size, TiffComponent *const pRoot)
Encrypt and decrypt Nikon data.
Definition: makernote_int.cpp:1274
TiffComponent * newSigmaMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Sigma makernote.
Definition: makernote_int.cpp:1131
TiffComponent * newOlympusMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create an Olympus makernote.
Definition: makernote_int.cpp:944
TiffComponent *(* NewMnFct2)(uint16_t tag, IfdId group, IfdId mnGroup)
Type for a pointer to a function creating a makernote (group)
Definition: makernote_int.hpp:62
int nikonAf2Selector(uint16_t tag, const byte *, uint32_t size, TiffComponent *const)
Function to select cfg + def of a Nikon complex binary array.
Definition: makernote_int.cpp:1265
std::string getExiv2ConfigPath()
Determine the path to the Exiv2 configuration file.
Definition: makernote_int.cpp:94
TiffComponent * newCasioMn(uint16_t tag, IfdId group, IfdId, const byte *pData, uint32_t size, ByteOrder)
Function to create a Casio2 makernote.
Definition: makernote_int.cpp:1171
TiffComponent * newNikon2Mn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Nikon2 makernote.
Definition: makernote_int.cpp:1026
IfdId
Type to specify the IFD to which a metadata belongs.
Definition: tags_int.hpp:46
TiffComponent * newSamsungMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte *pData, uint32_t size, ByteOrder)
Function to create a Samsung makernote.
Definition: makernote_int.cpp:1090
TiffComponent * newSamsungMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Samsung makernote.
Definition: makernote_int.cpp:1112
TiffComponent * newPentaxMn(uint16_t tag, IfdId group, IfdId, const byte *pData, uint32_t size, ByteOrder)
Function to create an Pentax makernote.
Definition: makernote_int.cpp:1059
std::string readExiv2Config(const std::string &section, const std::string &value, const std::string &def)
Read value from Exiv2 configuration file.
Definition: makernote_int.cpp:113
TiffComponent * newNikonMn(uint16_t tag, IfdId group, IfdId, const byte *pData, uint32_t size, ByteOrder)
Function to create a Nikon makernote. This will create the appropriate Nikon 1, 2 or 3 makernote,...
Definition: makernote_int.cpp:996
TiffComponent * newIfdMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a simple IFD makernote (Canon, Minolta, Nikon1)
Definition: makernote_int.cpp:919
TiffComponent *(* NewMnFct)(uint16_t tag, IfdId group, IfdId mnGroup, const byte *pData, uint32_t size, ByteOrder byteOrder)
Type for a pointer to a function creating a makernote (image)
Definition: makernote_int.hpp:54
TiffComponent * newSony1Mn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Sony1 makernote.
Definition: makernote_int.cpp:1157
TiffComponent * newOMSystemMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte *, uint32_t size, ByteOrder)
Function to create an OM Digital Solutions makernote.
Definition: makernote_int.cpp:958
TiffComponent * newPentaxDngMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create an Pentax DNG makernote.
Definition: makernote_int.cpp:1083
TiffComponent * newCasio2Mn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Casio2 makernote.
Definition: makernote_int.cpp:1187
TiffComponent * newOlympusMn(uint16_t tag, IfdId group, IfdId, const byte *pData, uint32_t size, ByteOrder)
Function to create an Olympus makernote.
Definition: makernote_int.cpp:926
TiffComponent * newIfdMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte *, uint32_t size, ByteOrder)
Function to create a simple IFD makernote (Canon, Minolta, Nikon1)
Definition: makernote_int.cpp:907
TiffComponent * newPentaxMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create an Pentax makernote.
Definition: makernote_int.cpp:1076
Provides classes and functions to encode and decode Exif and Iptc data. The libexiv2 API consists of ...
Definition: asfvideo.hpp:36
EXIV2API ExifData::const_iterator make(const ExifData &ed)
Return the camera make.
Definition: easyaccess.cpp:437
ByteOrder
Type to express the byte order (little or big endian)
Definition: types.hpp:102
Makernote registry structure.
Definition: makernote_int.hpp:67
bool operator==(const std::string &key) const
Compare a TiffMnRegistry structure with a key being the make string from the image....
Definition: makernote_int.cpp:155
NewMnFct2 newMnFct2_
Makernote create function (group)
Definition: makernote_int.hpp:85
IfdId mnGroup_
Group identifier.
Definition: makernote_int.hpp:83
NewMnFct newMnFct_
Makernote create function (image)
Definition: makernote_int.hpp:84
const char * make_
Camera make.
Definition: makernote_int.hpp:82