Exiv2
makernote_int.hpp
Go to the documentation of this file.
1 // ***************************************************************** -*- C++ -*-
2 /*
3  * Copyright (C) 2004-2018 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  */
30 #ifndef MAKERNOTE_INT_HPP_
31 #define MAKERNOTE_INT_HPP_
32 
33 // *****************************************************************************
34 // included header files
35 #include "tifffwd_int.hpp"
36 #include "tags_int.hpp"
37 #include "ini.hpp"
38 #include "types.hpp"
39 
40 // + standard includes
41 #include <string>
42 
43 // *****************************************************************************
44 // namespace extensions
45 namespace Exiv2 {
46  namespace Internal {
47 // *****************************************************************************
48 // function prototypes
53 
57  std::string readExiv2Config(const std::string& section,const std::string& value,const std::string& def);
58 
59 
60 // *****************************************************************************
61 // class definitions
62 
64  typedef TiffComponent* (*NewMnFct)(uint16_t tag,
65  IfdId group,
66  IfdId mnGroup,
67  const byte* pData,
68  uint32_t size,
69  ByteOrder byteOrder);
70 
72  typedef TiffComponent* (*NewMnFct2)(uint16_t tag,
73  IfdId group,
74  IfdId mnGroup);
75 
77  struct TiffMnRegistry {
78  struct MakeKey;
86  bool operator==(const std::string& key) const;
87 
89  bool operator==(IfdId key) const;
90 
91  // DATA
92  const char* make_;
96  };
97 
102  public:
114  static TiffComponent* create(uint16_t tag,
115  IfdId group,
116  const std::string& make,
117  const byte* pData,
118  uint32_t size,
119  ByteOrder byteOrder);
124  static TiffComponent* create(uint16_t tag,
125  IfdId group,
126  IfdId mnGroup);
127 
128  protected:
131  private:
132  static const TiffMnRegistry registry_[]; //<! List of makernotes
133  }; // class TiffMnCreator
134 
136  class MnHeader {
137  public:
139 
140  virtual ~MnHeader();
143 
145  virtual bool read(const byte* pData,
147  uint32_t size,
148  ByteOrder byteOrder) =0;
152  virtual void setByteOrder(ByteOrder byteOrder);
154 
156  virtual uint32_t size() const =0;
159  virtual uint32_t write(IoWrapper& ioWrapper,
160  ByteOrder byteOrder) const =0;
165  virtual uint32_t ifdOffset() const;
171  virtual ByteOrder byteOrder() const;
177  virtual uint32_t baseOffset(uint32_t mnOffset) const;
179 
180  }; // class MnHeader
181 
183  class OlympusMnHeader : public MnHeader {
184  public:
186 
187  OlympusMnHeader();
190  virtual ~OlympusMnHeader();
192 
194  virtual bool read(const byte* pData,
195  uint32_t size,
198 
200  virtual uint32_t size() const;
201  virtual uint32_t write(IoWrapper& ioWrapper, ByteOrder byteOrder) const;
202  virtual uint32_t ifdOffset() const;
204  static uint32_t sizeOfSignature();
206 
207  private:
208  DataBuf header_;
209  static const byte signature_[];
210 
211  }; // class OlympusMnHeader
212 
214  class Olympus2MnHeader : public MnHeader {
215  public:
217 
221  virtual ~Olympus2MnHeader();
223 
225  virtual bool read(const byte* pData,
226  uint32_t size,
229 
231  virtual uint32_t size() const;
232  virtual uint32_t write(IoWrapper& ioWrapper, ByteOrder byteOrder) const;
233  virtual uint32_t ifdOffset() const;
234  virtual uint32_t baseOffset(uint32_t mnOffset) const;
236  static uint32_t sizeOfSignature();
238 
239  private:
240  DataBuf header_;
241  static const byte signature_[];
242 
243  }; // class Olympus2MnHeader
244 
246  class FujiMnHeader : public MnHeader {
247  public:
249 
250  FujiMnHeader();
253  virtual ~FujiMnHeader();
255 
257  virtual bool read(const byte* pData,
258  uint32_t size,
260  // setByteOrder not implemented
262 
264  virtual uint32_t size() const;
265  virtual uint32_t write(IoWrapper& ioWrapper, ByteOrder byteOrder) const;
266  virtual uint32_t ifdOffset() const;
267  virtual ByteOrder byteOrder() const;
268  virtual uint32_t baseOffset(uint32_t mnOffset) const;
270  static uint32_t sizeOfSignature();
272 
273  private:
274  DataBuf header_;
275  static const byte signature_[];
276  static const ByteOrder byteOrder_;
277  uint32_t start_;
278 
279  }; // class FujiMnHeader
280 
282  class Nikon2MnHeader : public MnHeader {
283  public:
285 
286  Nikon2MnHeader();
289  virtual ~Nikon2MnHeader();
291 
293  virtual bool read(const byte* pData,
294  uint32_t size,
297 
299  virtual uint32_t size() const;
300  virtual uint32_t write(IoWrapper& ioWrapper, ByteOrder byteOrder) const;
301  virtual uint32_t ifdOffset() const;
303  static uint32_t sizeOfSignature();
305 
306  private:
307  DataBuf buf_;
308  uint32_t start_;
309  static const byte signature_[];
310 
311  }; // class Nikon2MnHeader
312 
314  class Nikon3MnHeader : public MnHeader {
315  public:
317 
318  Nikon3MnHeader();
321  virtual ~Nikon3MnHeader();
323 
325  virtual bool read(const byte* pData,
326  uint32_t size,
328  virtual void setByteOrder(ByteOrder byteOrder);
330 
332  virtual uint32_t size() const;
333  virtual uint32_t write(IoWrapper& ioWrapper, ByteOrder byteOrder) const;
334  virtual uint32_t ifdOffset() const;
335  virtual ByteOrder byteOrder() const;
336  virtual uint32_t baseOffset(uint32_t mnOffset) const;
338  static uint32_t sizeOfSignature();
340 
341  private:
342  DataBuf buf_;
343  ByteOrder byteOrder_;
344  uint32_t start_;
345  static const byte signature_[];
346 
347  }; // class Nikon3MnHeader
348 
350  class PanasonicMnHeader : public MnHeader {
351  public:
353 
357  virtual ~PanasonicMnHeader();
359 
361  virtual bool read(const byte* pData,
362  uint32_t size,
365 
367  virtual uint32_t size() const;
368  virtual uint32_t write(IoWrapper& ioWrapper, ByteOrder byteOrder) const;
369  virtual uint32_t ifdOffset() const;
371  static uint32_t sizeOfSignature();
373 
374  private:
375  DataBuf buf_;
376  uint32_t start_;
377  static const byte signature_[];
378 
379  }; // class PanasonicMnHeader
380 
382  class PentaxDngMnHeader : public MnHeader {
383  public:
385 
389  virtual ~PentaxDngMnHeader();
391 
393  virtual bool read(const byte* pData,
394  uint32_t size,
397 
399  virtual uint32_t size() const;
400  virtual uint32_t write(IoWrapper& ioWrapper, ByteOrder byteOrder) const;
401  virtual uint32_t ifdOffset() const;
402  virtual uint32_t baseOffset(uint32_t mnOffset) const;
404  static uint32_t sizeOfSignature();
406 
407  private:
408  DataBuf header_;
409  static const byte signature_[];
410 
411  }; // class PentaxDngMnHeader
412 
414  class PentaxMnHeader : public MnHeader {
415  public:
417 
418  PentaxMnHeader();
421  virtual ~PentaxMnHeader();
423 
425  virtual bool read(const byte* pData,
426  uint32_t size,
429 
431  virtual uint32_t size() const;
432  virtual uint32_t write(IoWrapper& ioWrapper, ByteOrder byteOrder) const;
433  virtual uint32_t ifdOffset() const;
435  static uint32_t sizeOfSignature();
437 
438  private:
439  DataBuf header_;
440  static const byte signature_[];
441 
442  }; // class PentaxMnHeader
443 
445  class SamsungMnHeader : public MnHeader {
446  public:
448 
449  SamsungMnHeader();
452 
454  virtual bool read(const byte* pData,
455  uint32_t size,
458 
460  virtual uint32_t size() const;
461  virtual uint32_t write(IoWrapper& ioWrapper, ByteOrder byteOrder) const;
462  virtual uint32_t baseOffset(uint32_t mnOffset) const;
464 
465  }; // class SamsungMnHeader
466 
468  class SigmaMnHeader : public MnHeader {
469  public:
471 
472  SigmaMnHeader();
475  virtual ~SigmaMnHeader();
477 
479  virtual bool read(const byte* pData,
480  uint32_t size,
483 
485  virtual uint32_t size() const;
486  virtual uint32_t write(IoWrapper& ioWrapper, ByteOrder byteOrder) const;
487  virtual uint32_t ifdOffset() const;
489  static uint32_t sizeOfSignature();
491 
492  private:
493  DataBuf buf_;
494  uint32_t start_;
495  static const byte signature1_[];
496  static const byte signature2_[];
497 
498  }; // class SigmaMnHeader
499 
501  class SonyMnHeader : public MnHeader {
502  public:
504 
505  SonyMnHeader();
508  virtual ~SonyMnHeader();
510 
512  virtual bool read(const byte* pData,
513  uint32_t size,
516 
518  virtual uint32_t size() const;
519  virtual uint32_t write(IoWrapper& ioWrapper, ByteOrder byteOrder) const;
520  virtual uint32_t ifdOffset() const;
522  static uint32_t sizeOfSignature();
524 
525  private:
526  DataBuf buf_;
527  uint32_t start_;
528  static const byte signature_[];
529 
530  }; // class SonyMnHeader
531 
533  class Casio2MnHeader : public MnHeader {
534  public:
536 
537  Casio2MnHeader();
540  virtual ~Casio2MnHeader();
542 
544  virtual bool read(const byte* pData,
545  uint32_t size,
548 
550  virtual uint32_t size() const;
551  virtual uint32_t write(IoWrapper& ioWrapper, ByteOrder byteOrder) const;
552  virtual uint32_t ifdOffset() const;
553  virtual ByteOrder byteOrder() const;
555  static uint32_t sizeOfSignature();
557 
558  private:
559  DataBuf buf_;
560  uint32_t start_;
561  static const byte signature_[];
562  static const ByteOrder byteOrder_;
563 
564  }; // class Casio2MnHeader
565 
566  // *****************************************************************************
567 // template, inline and free functions
568 
570  TiffComponent* newIfdMn(uint16_t tag,
571  IfdId group,
572  IfdId mnGroup,
573  const byte* pData,
574  uint32_t size,
575  ByteOrder byteOrder);
576 
578  TiffComponent* newIfdMn2(uint16_t tag,
579  IfdId group,
580  IfdId mnGroup);
581 
583  TiffComponent* newOlympusMn(uint16_t tag,
584  IfdId group,
585  IfdId mnGroup,
586  const byte* pData,
587  uint32_t size,
588  ByteOrder byteOrder);
589 
591  TiffComponent* newOlympusMn2(uint16_t tag,
592  IfdId group,
593  IfdId mnGroup);
594 
596  TiffComponent* newOlympus2Mn2(uint16_t tag,
597  IfdId group,
598  IfdId mnGroup);
599 
601  TiffComponent* newFujiMn(uint16_t tag,
602  IfdId group,
603  IfdId mnGroup,
604  const byte* pData,
605  uint32_t size,
606  ByteOrder byteOrder);
607 
609  TiffComponent* newFujiMn2(uint16_t tag,
610  IfdId group,
611  IfdId mnGroup);
612 
617  TiffComponent* newNikonMn(uint16_t tag,
618  IfdId group,
619  IfdId mnGroup,
620  const byte* pData,
621  uint32_t size,
622  ByteOrder byteOrder);
623 
625  TiffComponent* newNikon2Mn2(uint16_t tag,
626  IfdId group,
627  IfdId mnGroup);
628 
630  TiffComponent* newNikon3Mn2(uint16_t tag,
631  IfdId group,
632  IfdId mnGroup);
633 
635  TiffComponent* newPanasonicMn(uint16_t tag,
636  IfdId group,
637  IfdId mnGroup,
638  const byte* pData,
639  uint32_t size,
640  ByteOrder byteOrder);
641 
643  TiffComponent* newPanasonicMn2(uint16_t tag,
644  IfdId group,
645  IfdId mnGroup);
646 
648  TiffComponent* newPentaxMn(uint16_t tag,
649  IfdId group,
650  IfdId mnGroup,
651  const byte* pData,
652  uint32_t size,
653  ByteOrder byteOrder);
654 
656  TiffComponent* newPentaxMn2(uint16_t tag,
657  IfdId group,
658  IfdId mnGroup);
659 
661  TiffComponent* newPentaxDngMn2(uint16_t tag,
662  IfdId group,
663  IfdId mnGroup);
664 
666  TiffComponent* newSamsungMn(uint16_t tag,
667  IfdId group,
668  IfdId mnGroup,
669  const byte* pData,
670  uint32_t size,
671  ByteOrder byteOrder);
672 
674  TiffComponent* newSamsungMn2(uint16_t tag,
675  IfdId group,
676  IfdId mnGroup);
677 
679  TiffComponent* newSigmaMn(uint16_t tag,
680  IfdId group,
681  IfdId mnGroup,
682  const byte* pData,
683  uint32_t size,
684  ByteOrder byteOrder);
685 
687  TiffComponent* newSigmaMn2(uint16_t tag,
688  IfdId group,
689  IfdId mnGroup);
690 
692  TiffComponent* newSonyMn(uint16_t tag,
693  IfdId group,
694  IfdId mnGroup,
695  const byte* pData,
696  uint32_t size,
697  ByteOrder byteOrder);
698 
700  TiffComponent* newSony1Mn2(uint16_t tag,
701  IfdId group,
702  IfdId mnGroup);
703 
705  TiffComponent* newSony2Mn2(uint16_t tag,
706  IfdId group,
707  IfdId mnGroup);
708 
710  TiffComponent* newCasioMn(uint16_t tag,
711  IfdId group,
712  IfdId mnGroup,
713  const byte* pData,
714  uint32_t size,
715  ByteOrder byteOrder);
716 
718  TiffComponent* newCasio2Mn2(uint16_t tag,
719  IfdId group,
720  IfdId mnGroup);
721 
731  int sonyCsSelector(uint16_t tag, const byte* pData, uint32_t size, TiffComponent* const pRoot);
732 
742  int nikonSelector(uint16_t tag, const byte* pData, uint32_t size, TiffComponent* const pRoot);
743 
753  int nikonAf2Selector(uint16_t tag, const byte* pData, uint32_t size, TiffComponent* const pRoot);
754 
771  DataBuf nikonCrypt(uint16_t tag, const byte* pData, uint32_t size, TiffComponent* const pRoot);
772 
773 }} // namespace Internal, Exiv2
774 
775 #endif // #ifndef MAKERNOTE_INT_HPP_
static uint32_t sizeOfSignature()
Return the size of the makernote header signature.
Definition: makernote_int.cpp:570
virtual ~PentaxDngMnHeader()
Virtual destructor.
Definition: makernote_int.cpp:580
const char * make_
Camera make.
Definition: makernote_int.hpp:92
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
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:225
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:302
PentaxDngMnHeader()
Default constructor.
Definition: makernote_int.cpp:575
Header of an Olympus II Makernote.
Definition: makernote_int.hpp:214
virtual ~PentaxMnHeader()
Virtual destructor.
Definition: makernote_int.cpp:634
Internal TIFF parser related typedefs and forward definitions.
PentaxMnHeader()
Default constructor.
Definition: makernote_int.cpp:629
ByteOrder
Type to express the byte order (little or big endian)
Definition: types.hpp:113
Utility class containing a character array. All it does is to take care of memory allocation and dele...
Definition: types.hpp:204
Header of a Samsung Makernote, only used for the relative offset.
Definition: makernote_int.hpp:445
virtual uint32_t size() const
Return the size of the header (in bytes).
Definition: makernote_int.cpp:638
Header of a Fujifilm Makernote.
Definition: makernote_int.hpp:246
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:684
virtual uint32_t size() const
Return the size of the header (in bytes).
Definition: makernote_int.cpp:248
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:470
virtual ~FujiMnHeader()
Virtual destructor.
Definition: makernote_int.cpp:348
static uint32_t sizeOfSignature()
Return the size of the makernote header signature.
Definition: makernote_int.cpp:338
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:729
Casio2MnHeader()
Default constructor.
Definition: makernote_int.cpp:806
Header of a Nikon 3 Makernote.
Definition: makernote_int.hpp:314
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:307
Header of a Nikon 2 Makernote.
Definition: makernote_int.hpp:282
virtual ~PanasonicMnHeader()
Virtual destructor.
Definition: makernote_int.cpp:533
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:724
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:871
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:372
SigmaMnHeader()
Default constructor.
Definition: makernote_int.cpp:710
TiffComponent * newPentaxMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create an Pentax makernote.
Definition: makernote_int.cpp:1002
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:772
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:480
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:1045
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:312
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:1235
TiffComponent * newIfdMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a simple IFD makernote (Canon, Minolta, Nikon1)
Definition: makernote_int.cpp:864
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:1188
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:742
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:599
virtual uint32_t size() const
Return the size of the header (in bytes).
Definition: makernote_int.cpp:465
Header of an Pentax DNG Makernote.
Definition: makernote_int.hpp:382
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:253
uint8_t byte
1 byte unsigned integer type.
Definition: types.hpp:105
virtual ~Casio2MnHeader()
Virtual destructor.
Definition: makernote_int.cpp:811
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
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:1064
virtual ~MnHeader()
Virtual destructor.
Definition: makernote_int.cpp:207
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:485
Simple IO wrapper to ensure that the header is only written if there is any other data at all...
Definition: tiffcomposite_int.hpp:124
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:258
Type definitions for Exiv2 and related functionality.
Header of a Sigma Makernote.
Definition: makernote_int.hpp:468
virtual ~SigmaMnHeader()
Virtual destructor.
Definition: makernote_int.cpp:715
PanasonicMnHeader()
Default constructor.
Definition: makernote_int.cpp:528
static uint32_t sizeOfSignature()
Return the size of the makernote header signature.
Definition: makernote_int.cpp:448
virtual uint32_t size() const
Return the size of the header (in bytes).
Definition: makernote_int.cpp:815
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:789
virtual ~Nikon3MnHeader()
Virtual destructor.
Definition: makernote_int.cpp:461
static uint32_t sizeOfSignature()
Return the size of the makernote header signature.
Definition: makernote_int.cpp:283
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:903
std::string getExiv2ConfigPath()
Determine the path to the Exiv2 configuration file.
Definition: makernote_int.cpp:94
Interface class for components of a TIFF directory hierarchy (Composite pattern). Both TIFF directori...
Definition: tiffcomposite_int.hpp:174
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:691
virtual ~Olympus2MnHeader()
Virtual destructor.
Definition: makernote_int.cpp:293
TiffComponent * newPentaxDngMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create an Pentax DNG makernote.
Definition: makernote_int.cpp:1009
virtual uint32_t size() const
Return the size of the header (in bytes).
Definition: makernote_int.cpp:414
virtual ~SonyMnHeader()
Virtual destructor.
Definition: makernote_int.cpp:763
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:362
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:820
TiffComponent * newNikon2Mn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Nikon2 makernote.
Definition: makernote_int.cpp:952
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:830
virtual uint32_t size() const
Return the size of the header (in bytes).
Definition: makernote_int.cpp:537
virtual uint32_t size() const =0
Return the size of the header (in bytes).
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:424
virtual bool read(const byte *pData, uint32_t size, ByteOrder byteOrder)=0
Read the header from a data buffer, return true if ok.
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:842
virtual uint32_t size() const
Return the size of the header (in bytes).
Definition: makernote_int.cpp:584
virtual uint32_t size() const
Return the size of the header (in bytes).
Definition: makernote_int.cpp:297
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:1097
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:389
Nikon2MnHeader()
Default constructor.
Definition: makernote_int.cpp:405
Header of a Panasonic Makernote.
Definition: makernote_int.hpp:350
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:825
virtual uint32_t size() const
Return the size of the header (in bytes).
Definition: makernote_int.cpp:767
OlympusMnHeader()
Default constructor.
Definition: makernote_int.cpp:239
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:547
virtual uint32_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:183
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:852
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:326
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:559
~TiffMnCreator()
Prevent destruction (needed if used as a policy class)
Definition: makernote_int.hpp:130
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:436
Header of a Sony Makernote.
Definition: makernote_int.hpp:501
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:1016
NewMnFct newMnFct_
Makernote create function (image)
Definition: makernote_int.hpp:94
Header of a Casio2 Makernote.
Definition: makernote_int.hpp:533
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:662
virtual void setByteOrder(ByteOrder byteOrder)
Set the byte order for the makernote.
Definition: makernote_int.cpp:211
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:542
TiffComponent * newSamsungMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Samsung makernote.
Definition: makernote_int.cpp:1038
TiffComponent *(* NewMnFct2)(uint16_t tag, IfdId group, IfdId mnGroup)
Type for a pointer to a function creating a makernote (group)
Definition: makernote_int.hpp:72
virtual void setByteOrder(ByteOrder byteOrder)
Set the byte order for the makernote.
Definition: makernote_int.cpp:514
IPTC string type.
Definition: types.hpp:147
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
EXIV2API ExifData::const_iterator make(const ExifData &ed)
Return the camera make.
Definition: easyaccess.cpp:428
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:419
virtual uint32_t size() const
Return the size of the header (in bytes).
Definition: makernote_int.cpp:719
TiffComponent * newSony1Mn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Sony1 makernote.
Definition: makernote_int.cpp:1083
static uint32_t sizeOfSignature()
Return the size of the makernote header signature.
Definition: makernote_int.cpp:400
static uint32_t sizeOfSignature()
Return the size of the makernote header signature.
Definition: makernote_int.cpp:234
Internal Exif tag and type information.
static uint32_t sizeOfSignature()
Return the size of the makernote header signature.
Definition: makernote_int.cpp:704
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:500
TiffComponent * newCasio2Mn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Casio2 makernote.
Definition: makernote_int.cpp:1113
IfdId mnGroup_
Group identifier.
Definition: makernote_int.hpp:93
static uint32_t sizeOfSignature()
Return the size of the makernote header signature.
Definition: makernote_int.cpp:624
DataBuf nikonCrypt(uint16_t tag, const byte *pData, uint32_t size, TiffComponent *const pRoot)
Encrypt and decrypt Nikon data.
Definition: makernote_int.cpp:1197
virtual ~OlympusMnHeader()
Virtual destructor.
Definition: makernote_int.cpp:244
Makernote header interface. This class is used with TIFF makernotes.
Definition: makernote_int.hpp:136
Makernote registry structure.
Definition: makernote_int.hpp:77
Provides classes and functions to encode and decode Exif and Iptc data. The libexiv2 API consists of ...
Definition: asfvideo.hpp:36
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:922
static uint32_t sizeOfSignature()
Return the size of the makernote header signature.
Definition: makernote_int.cpp:523
Olympus2MnHeader()
Default constructor.
Definition: makernote_int.cpp:288
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:367
TIFF makernote factory for concrete TIFF makernotes.
Definition: makernote_int.hpp:101
TiffComponent * newSony2Mn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Sony2 makernote.
Definition: makernote_int.cpp:1090
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:64
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:594
virtual ~Nikon2MnHeader()
Virtual destructor.
Definition: makernote_int.cpp:410
static uint32_t sizeOfSignature()
Return the size of the makernote header signature.
Definition: makernote_int.cpp:753
TiffComponent * newSigmaMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Sigma makernote.
Definition: makernote_int.cpp:1057
Header of an Pentax Makernote.
Definition: makernote_int.hpp:414
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:777
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:1181
NewMnFct2 newMnFct2_
Makernote create function (group)
Definition: makernote_int.hpp:95
Nikon3MnHeader()
Default constructor.
Definition: makernote_int.cpp:453
SamsungMnHeader()
Default constructor.
Definition: makernote_int.cpp:669
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:475
static uint32_t sizeOfSignature()
Return the size of the makernote header signature.
Definition: makernote_int.cpp:801
TiffComponent * newOlympusMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create an Olympus makernote.
Definition: makernote_int.cpp:889
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:648
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:154
FujiMnHeader()
Default constructor.
Definition: makernote_int.cpp:343
TiffComponent * newPanasonicMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Panasonic makernote.
Definition: makernote_int.cpp:978
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:613
IfdId
Type to specify the IFD to which a metadata belongs.
Definition: tags_int.hpp:54
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:215
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:985
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:220
SonyMnHeader()
Default constructor.
Definition: makernote_int.cpp:758
virtual uint32_t size() const
Return the size of the header (in bytes).
Definition: makernote_int.cpp:352
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:679
TiffComponent * newFujiMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Fujifilm makernote.
Definition: makernote_int.cpp:915
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:966
virtual uint32_t size() const
Return the size of the header (in bytes).
Definition: makernote_int.cpp:674
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:589
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:643
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:272
TiffComponent * newOlympus2Mn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create an Olympus II makernote.
Definition: makernote_int.cpp:896
TiffComponent * newNikon3Mn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Nikon3 makernote.
Definition: makernote_int.cpp:959