Exiv2
Loading...
Searching...
No Matches
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
12namespace Exiv2::Internal {
13class IoWrapper;
14class TiffComponent;
15// *****************************************************************************
16// function prototypes
20std::string getExiv2ConfigPath();
21
25std::string readExiv2Config(const std::string& section, const std::string& value, const std::string& def);
26
27// *****************************************************************************
28// class definitions
29
31using NewMnFct = std::unique_ptr<TiffComponent> (*)(uint16_t, IfdId, IfdId, const byte*, size_t, ByteOrder);
32
34using NewMnFct2 = std::unique_ptr<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_;
56};
57
62 public:
74 static std::unique_ptr<TiffComponent> create(uint16_t tag, IfdId group, const std::string& make, const byte* pData,
75 size_t size, ByteOrder byteOrder);
80 static std::unique_ptr<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
92class MnHeader {
93 public:
95
96
97 virtual ~MnHeader() = default;
99
101
102 virtual bool read(const byte* pData, size_t size, ByteOrder byteOrder) = 0;
106 virtual void setByteOrder(ByteOrder byteOrder);
108
110
111 [[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
136class OlympusMnHeader : public MnHeader {
137 public:
139
140
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
154 static size_t sizeOfSignature();
155
156 private:
157 DataBuf header_;
158 static const byte signature_[];
159
160}; // class OlympusMnHeader
161
164 public:
166
167
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
182 static size_t sizeOfSignature();
183
184 private:
185 DataBuf header_;
186 static const byte signature_[];
187
188}; // class Olympus2MnHeader
189
192 public:
194
195
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
210 static size_t sizeOfSignature();
211
212 private:
213 DataBuf header_;
214 static const byte signature_[];
215
216}; // class OMSystemMnHeader
217
219class FujiMnHeader : public MnHeader {
220 public:
222
223
224 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
240 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
251class Nikon2MnHeader : public MnHeader {
252 public:
254
255
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
269 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
279class Nikon3MnHeader : public MnHeader {
280 public:
282
283
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
300 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
312 public:
314
315
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
329 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
340 public:
342
343
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
358 static size_t sizeOfSignature();
359
360 private:
361 DataBuf header_;
362 static const byte signature_[];
363
364}; // class PentaxDngMnHeader
365
367class PentaxMnHeader : public MnHeader {
368 public:
370
371
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
385 static size_t sizeOfSignature();
386
387 private:
388 DataBuf header_;
389 static const byte signature_[];
390
391}; // class PentaxMnHeader
392
394class SamsungMnHeader : public MnHeader {
395 public:
397
398
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
415class SigmaMnHeader : public MnHeader {
416 public:
418
419
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
433 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
444class SonyMnHeader : public MnHeader {
445 public:
447
448
449 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
462 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
472class Casio2MnHeader : public MnHeader {
473 public:
475
476
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
491 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
505std::unique_ptr<TiffComponent> newIfdMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte* pData, size_t size,
506 ByteOrder byteOrder);
507
509std::unique_ptr<TiffComponent> newIfdMn2(uint16_t tag, IfdId group, IfdId mnGroup);
510
512std::unique_ptr<TiffComponent> newOlympusMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte* pData, size_t size,
513 ByteOrder byteOrder);
514
516std::unique_ptr<TiffComponent> newOlympusMn2(uint16_t tag, IfdId group, IfdId mnGroup);
517
519std::unique_ptr<TiffComponent> newOlympus2Mn2(uint16_t tag, IfdId group, IfdId mnGroup);
520
522std::unique_ptr<TiffComponent> newOMSystemMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte* pData, size_t size,
523 ByteOrder byteOrder);
524
526std::unique_ptr<TiffComponent> newOMSystemMn2(uint16_t tag, IfdId group, IfdId mnGroup);
527
529std::unique_ptr<TiffComponent> newFujiMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte* pData, size_t size,
530 ByteOrder byteOrder);
531
533std::unique_ptr<TiffComponent> newFujiMn2(uint16_t tag, IfdId group, IfdId mnGroup);
534
539std::unique_ptr<TiffComponent> newNikonMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte* pData, size_t size,
540 ByteOrder byteOrder);
541
543std::unique_ptr<TiffComponent> newNikon2Mn2(uint16_t tag, IfdId group, IfdId mnGroup);
544
546std::unique_ptr<TiffComponent> newNikon3Mn2(uint16_t tag, IfdId group, IfdId mnGroup);
547
549std::unique_ptr<TiffComponent> newPanasonicMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte* pData, size_t size,
550 ByteOrder byteOrder);
551
553std::unique_ptr<TiffComponent> newPanasonicMn2(uint16_t tag, IfdId group, IfdId mnGroup);
554
556std::unique_ptr<TiffComponent> newPentaxMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte* pData, size_t size,
557 ByteOrder byteOrder);
558
560std::unique_ptr<TiffComponent> newPentaxMn2(uint16_t tag, IfdId group, IfdId mnGroup);
561
563std::unique_ptr<TiffComponent> newPentaxDngMn2(uint16_t tag, IfdId group, IfdId mnGroup);
564
566std::unique_ptr<TiffComponent> newSamsungMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte* pData, size_t size,
567 ByteOrder byteOrder);
568
570std::unique_ptr<TiffComponent> newSamsungMn2(uint16_t tag, IfdId group, IfdId mnGroup);
571
573std::unique_ptr<TiffComponent> newSigmaMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte* pData, size_t size,
574 ByteOrder byteOrder);
575
577std::unique_ptr<TiffComponent> newSigmaMn2(uint16_t tag, IfdId group, IfdId mnGroup);
578
580std::unique_ptr<TiffComponent> newSonyMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte* pData, size_t size,
581 ByteOrder byteOrder);
582
584std::unique_ptr<TiffComponent> newSony1Mn2(uint16_t tag, IfdId group, IfdId mnGroup);
585
587std::unique_ptr<TiffComponent> newSony2Mn2(uint16_t tag, IfdId group, IfdId mnGroup);
588
590std::unique_ptr<TiffComponent> newCasioMn(uint16_t tag, IfdId group, IfdId mnGroup, const byte* pData, size_t size,
591 ByteOrder byteOrder);
592
594std::unique_ptr<TiffComponent> newCasio2Mn2(uint16_t tag, IfdId group, IfdId mnGroup);
595
605int sonyCsSelector(uint16_t tag, const byte* pData, size_t size, TiffComponent* pRoot);
606
616int sony2010eSelector(uint16_t tag, const byte* pData, size_t size, TiffComponent* pRoot);
617
627int sony2FpSelector(uint16_t tag, const byte* pData, size_t size, TiffComponent* pRoot);
628
638int sonyMisc2bSelector(uint16_t tag, const byte* pData, size_t size, TiffComponent* pRoot);
639
649int sonyMisc3cSelector(uint16_t tag, const byte* pData, size_t size, TiffComponent* pRoot);
650
660int nikonSelector(uint16_t tag, const byte* pData, size_t size, TiffComponent* pRoot);
661
678DataBuf nikonCrypt(uint16_t tag, const byte* pData, size_t size, TiffComponent* pRoot);
679
680} // namespace Exiv2::Internal
681
682#endif // EXIV2_MAKERNOTE_INT_HPP
Header of a Casio2 Makernote.
Definition makernote_int.hpp:472
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:639
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:624
static size_t sizeOfSignature()
Return the size of the makernote header signature.
Definition makernote_int.cpp:608
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:620
size_t size() const override
Return the size of the header (in bytes).
Definition makernote_int.cpp:616
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:628
Casio2MnHeader()
Default constructor.
Definition makernote_int.cpp:612
Header of a Fujifilm Makernote.
Definition makernote_int.hpp:219
FujiMnHeader()
Default constructor.
Definition makernote_int.cpp:290
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:321
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:306
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:302
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:310
static size_t sizeOfSignature()
Return the size of the makernote header signature.
Definition makernote_int.cpp:286
size_t size() const override
Return the size of the header (in bytes).
Definition makernote_int.cpp:294
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:298
Simple IO wrapper to ensure that the header is only written if there is any other data at all.
Definition tiffcomposite_int.hpp:102
Makernote header interface. This class is used with TIFF makernotes.
Definition makernote_int.hpp:92
virtual void setByteOrder(ByteOrder byteOrder)
Set the byte order for the makernote.
Definition makernote_int.cpp:166
virtual size_t size() const =0
Return the size of the header (in bytes).
virtual bool read(const byte *pData, size_t size, ByteOrder byteOrder)=0
Read the header from a data buffer, return true if ok.
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:169
virtual ~MnHeader()=default
Virtual destructor.
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:177
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:173
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 a Nikon 2 Makernote.
Definition makernote_int.hpp:251
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:340
size_t size() const override
Return the size of the header (in bytes).
Definition makernote_int.cpp:336
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:355
Nikon2MnHeader()
Default constructor.
Definition makernote_int.cpp:332
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:344
static size_t sizeOfSignature()
Return the size of the makernote header signature.
Definition makernote_int.cpp:328
Header of a Nikon 3 Makernote.
Definition makernote_int.hpp:279
Nikon3MnHeader()
Default constructor.
Definition makernote_int.cpp:367
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:384
size_t size() const override
Return the size of the header (in bytes).
Definition makernote_int.cpp:372
void setByteOrder(ByteOrder byteOrder) override
Set the byte order for the makernote.
Definition makernote_int.cpp:412
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:403
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:376
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:388
static size_t sizeOfSignature()
Return the size of the makernote header signature.
Definition makernote_int.cpp:363
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:380
Header of an OM Digital Solutions (ex Olympus) Makernote.
Definition makernote_int.hpp:191
OMSystemMnHeader()
Default constructor.
Definition makernote_int.cpp:254
static size_t sizeOfSignature()
Return the size of the makernote header signature.
Definition makernote_int.cpp:250
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:266
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:270
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:262
size_t size() const override
Return the size of the header (in bytes).
Definition makernote_int.cpp:258
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:278
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:226
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:230
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:234
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:242
static size_t sizeOfSignature()
Return the size of the makernote header signature.
Definition makernote_int.cpp:214
size_t size() const override
Return the size of the header (in bytes).
Definition makernote_int.cpp:222
Olympus2MnHeader()
Default constructor.
Definition makernote_int.cpp:218
Header of an Olympus Makernote.
Definition makernote_int.hpp:136
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:195
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:207
OlympusMnHeader()
Default constructor.
Definition makernote_int.cpp:187
size_t size() const override
Return the size of the header (in bytes).
Definition makernote_int.cpp:191
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:199
static size_t sizeOfSignature()
Return the size of the makernote header signature.
Definition makernote_int.cpp:183
Header of a Panasonic Makernote.
Definition makernote_int.hpp:311
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:445
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:434
PanasonicMnHeader()
Default constructor.
Definition makernote_int.cpp:422
size_t size() const override
Return the size of the header (in bytes).
Definition makernote_int.cpp:426
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:430
static size_t sizeOfSignature()
Return the size of the makernote header signature.
Definition makernote_int.cpp:418
Header of an Pentax DNG Makernote.
Definition makernote_int.hpp:339
PentaxDngMnHeader()
Default constructor.
Definition makernote_int.cpp:456
static size_t sizeOfSignature()
Return the size of the makernote header signature.
Definition makernote_int.cpp:452
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:464
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:468
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:472
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:480
size_t size() const override
Return the size of the header (in bytes).
Definition makernote_int.cpp:460
Header of an Pentax Makernote.
Definition makernote_int.hpp:367
static size_t sizeOfSignature()
Return the size of the makernote header signature.
Definition makernote_int.cpp:487
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:511
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:499
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:503
size_t size() const override
Return the size of the header (in bytes).
Definition makernote_int.cpp:495
PentaxMnHeader()
Default constructor.
Definition makernote_int.cpp:491
Header of a Samsung Makernote, only used for the relative offset.
Definition makernote_int.hpp:394
SamsungMnHeader()
Default constructor.
Definition makernote_int.cpp:516
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:528
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:532
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:524
size_t size() const override
Return the size of the header (in bytes).
Definition makernote_int.cpp:520
Header of a Sigma Makernote.
Definition makernote_int.hpp:415
static size_t sizeOfSignature()
Return the size of the makernote header signature.
Definition makernote_int.cpp:539
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:551
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:555
SigmaMnHeader()
Default constructor.
Definition makernote_int.cpp:543
size_t size() const override
Return the size of the header (in bytes).
Definition makernote_int.cpp:547
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:566
Header of a Sony Makernote.
Definition makernote_int.hpp:444
SonyMnHeader()
Default constructor.
Definition makernote_int.cpp:577
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:585
static size_t sizeOfSignature()
Return the size of the makernote header signature.
Definition makernote_int.cpp:573
size_t size() const override
Return the size of the header (in bytes).
Definition makernote_int.cpp:581
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:600
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:589
Interface class for components of a TIFF directory hierarchy (Composite pattern). Both TIFF directori...
Definition tiffcomposite_int.hpp:152
TIFF makernote factory for concrete TIFF makernotes.
Definition makernote_int.hpp:61
TiffMnCreator(const TiffComponent &)=delete
Prevent destruction (needed if used as a policy class)
static std::unique_ptr< 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:149
Helper structure for the Matroska tags lookup table.
Definition matroskavideo.hpp:39
std::unique_ptr< 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
std::unique_ptr< TiffComponent > newCasio2Mn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Casio2 makernote.
Definition makernote_int.cpp:847
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:967
std::unique_ptr< 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:712
std::unique_ptr< TiffComponent > newSigmaMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Sigma makernote.
Definition makernote_int.cpp:810
std::unique_ptr< TiffComponent > newSony2Mn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Sony2 makernote.
Definition makernote_int.cpp:833
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:977
std::unique_ptr< 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
std::unique_ptr< TiffComponent > newNikon3Mn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Nikon3 makernote.
Definition makernote_int.cpp:741
std::unique_ptr< TiffComponent > newNikon2Mn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Nikon2 makernote.
Definition makernote_int.cpp:737
std::unique_ptr< TiffComponent > newPanasonicMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Panasonic makernote.
Definition makernote_int.cpp:753
std::unique_ptr< 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:688
std::unique_ptr< TiffComponent > newFujiMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Fujifilm makernote.
Definition makernote_int.cpp:708
std::unique_ptr< 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:745
std::unique_ptr< 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:700
DataBuf nikonCrypt(uint16_t tag, const byte *pData, size_t size, TiffComponent *pRoot)
Encrypt and decrypt Nikon data.
Definition makernote_int.cpp:926
std::unique_ptr< TiffComponent > newPentaxDngMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create an Pentax DNG makernote.
Definition makernote_int.cpp:778
std::unique_ptr< TiffComponent > newSony1Mn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Sony1 makernote.
Definition makernote_int.cpp:829
std::unique_ptr< 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:757
std::unique_ptr< TiffComponent > newSamsungMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a Samsung makernote.
Definition makernote_int.cpp:798
std::unique_ptr< TiffComponent > newOMSystemMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create an OM Digital Solutions makernote.
Definition makernote_int.cpp:696
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:916
std::string getExiv2ConfigPath()
Determine the path to the Exiv2 configuration file.
Definition makernote_int.cpp:66
std::unique_ptr< TiffComponent > newIfdMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create a simple IFD makernote (Canon, Minolta, Nikon1)
Definition makernote_int.cpp:655
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:993
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:94
std::unique_ptr< 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:782
std::unique_ptr< 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:659
std::unique_ptr< TiffComponent > newOlympusMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create an Olympus makernote.
Definition makernote_int.cpp:680
std::unique_ptr< TiffComponent > newPentaxMn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create an Pentax makernote.
Definition makernote_int.cpp:774
std::unique_ptr< 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:837
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:986
std::unique_ptr< 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:802
std::unique_ptr< TiffComponent > newOlympus2Mn2(uint16_t tag, IfdId group, IfdId mnGroup)
Function to create an Olympus II makernote.
Definition makernote_int.cpp:684
std::unique_ptr< 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:647
std::unique_ptr< 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:814
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:1020
IfdId
Type to specify the IFD to which a metadata belongs.
Definition tags.hpp:34
EXIV2API ExifData::const_iterator make(const ExifData &ed)
Return the camera make. Please keep in mind that this accessor is provided for convenience only and w...
Definition easyaccess.cpp:333
ByteOrder
Type to express the byte order (little or big endian)
Definition types.hpp:34
Utility class containing a character array. All it does is to take care of memory allocation and dele...
Definition types.hpp:124
Makernote registry structure.
Definition makernote_int.hpp:37
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:138
NewMnFct2 newMnFct2_
Makernote create function (group)
Definition makernote_int.hpp:55
IfdId mnGroup_
Group identifier.
Definition makernote_int.hpp:53
NewMnFct newMnFct_
Makernote create function (image)
Definition makernote_int.hpp:54
const char * make_
Camera make.
Definition makernote_int.hpp:52