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

Method readMetadata

src/orfimage.cpp:70–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68} // OrfImage::printStructure
69
70void OrfImage::readMetadata() {
71#ifdef EXIV2_DEBUG_MESSAGES
72 std::cerr << "Reading ORF file " << io_->path() << "\n";
73#endif
74 if (io_->open() != 0) {
75 throw Error(ErrorCode::kerDataSourceOpenFailed, io_->path(), strError());
76 }
77 IoCloser closer(*io_);
78 // Ensure that this is the correct image type
79 if (!isOrfType(*io_, false)) {
80 if (io_->error() || io_->eof())
81 throw Error(ErrorCode::kerFailedToReadImageData);
82 throw Error(ErrorCode::kerNotAnImage, "ORF");
83 }
84 clearMetadata();
85 ByteOrder bo = OrfParser::decode(exifData_, iptcData_, xmpData_, io_->mmap(), io_->size());
86 setByteOrder(bo);
87}
88
89void OrfImage::writeMetadata() {
90#ifdef EXIV2_DEBUG_MESSAGES

Callers

nothing calls this directly

Calls 8

ErrorFunction · 0.85
strErrorFunction · 0.85
isOrfTypeFunction · 0.85
eofMethod · 0.80
mmapMethod · 0.80
openMethod · 0.45
errorMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected