MCPcopy Create free account
hub / github.com/Exiv2/exiv2 / TiffEncoder

Method TiffEncoder

src/tiffvisitor_int.cpp:444–473  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

442}
443
444TiffEncoder::TiffEncoder(ExifData& exifData, IptcData& iptcData, XmpData& xmpData, TiffComponent* pRoot,
445 const bool isNewImage, const PrimaryGroups* pPrimaryGroups, const TiffHeaderBase* pHeader,
446 FindEncoderFct findEncoderFct) :
447 exifData_(exifData),
448 iptcData_(iptcData),
449 xmpData_(xmpData),
450 pHeader_(pHeader),
451 pRoot_(pRoot),
452 isNewImage_(isNewImage),
453 pPrimaryGroups_(pPrimaryGroups),
454 byteOrder_(pHeader->byteOrder()),
455 origByteOrder_(byteOrder_),
456 findEncoderFct_(findEncoderFct) {
457 encodeIptc();
458 encodeXmp();
459
460 // Find camera make
461 ExifKey key("Exif.Image.Make");
462 if (auto pos = exifData_.findKey(key); pos != exifData_.end()) {
463 make_ = pos->toString();
464 }
465 if (make_.empty() && pRoot_) {
466 TiffFinder finder(0x010f, IfdId::ifd0Id);
467 pRoot_->accept(finder);
468 auto te = dynamic_cast<TiffEntryBase*>(finder.result());
469 if (te && te->pValue()) {
470 make_ = te->pValue()->toString();
471 }
472 }
473}
474
475void TiffEncoder::encodeIptc() {
476 // Update IPTCNAA Exif tag, if it exists. Delete the tag if there

Callers

nothing calls this directly

Calls 8

acceptMethod · 0.80
resultMethod · 0.80
pValueMethod · 0.80
byteOrderMethod · 0.45
findKeyMethod · 0.45
endMethod · 0.45
toStringMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected