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

Method encodeBasic

src/crwimage_int.cpp:844–857  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

842} // CrwMap::encode
843
844void CrwMap::encodeBasic(const Image& image, const CrwMapping* pCrwMapping, CiffHeader* pHead) {
845 // Determine the source Exif metadatum
846 ExifKey ek(pCrwMapping->tag_, Internal::groupName(pCrwMapping->ifdId_));
847 auto ed = image.exifData().findKey(ek);
848
849 // Set the new value or remove the entry
850 if (ed != image.exifData().end() && ed->size() > 0) {
851 DataBuf buf(ed->size());
852 ed->copy(buf.data(), pHead->byteOrder());
853 pHead->add(pCrwMapping->crwTagId_, pCrwMapping->crwDir_, std::move(buf));
854 } else {
855 pHead->remove(pCrwMapping->crwTagId_, pCrwMapping->crwDir_);
856 }
857} // CrwMap::encodeBasic
858
859void CrwMap::encode0x0805(const Image& image, const CrwMapping* pCrwMapping, CiffHeader* pHead) {
860 std::string comment = image.comment();

Callers

nothing calls this directly

Calls 9

groupNameFunction · 0.85
dataMethod · 0.80
removeMethod · 0.80
findKeyMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45
copyMethod · 0.45
byteOrderMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected