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

Method encode

src/tiffimage.cpp:219–235  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

217} // TiffParser::decode
218
219WriteMethod TiffParser::encode(BasicIo& io, const byte* pData, size_t size, ByteOrder byteOrder, ExifData& exifData,
220 IptcData& iptcData, XmpData& xmpData) {
221 // Delete IFDs which do not occur in TIFF images
222 static constexpr auto filteredIfds = std::array{
223 IfdId::panaRawId,
224 };
225 for (auto filteredIfd : filteredIfds) {
226#ifdef EXIV2_DEBUG_MESSAGES
227 std::cerr << "Warning: Exif IFD " << filteredIfd << " not encoded\n";
228#endif
229 exifData.erase(std::remove_if(exifData.begin(), exifData.end(), FindExifdatum(filteredIfd)), exifData.end());
230 }
231
232 TiffHeader header(byteOrder);
233 return TiffParserWorker::encode(io, pData, size, exifData, iptcData, xmpData, Tag::root, TiffMapping::findEncoder,
234 &header, nullptr);
235} // TiffParser::encode
236
237// *************************************************************************
238// free functions

Callers

nothing calls this directly

Calls 5

FindExifdatumClass · 0.85
encodeFunction · 0.85
eraseMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected