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

Method create

src/image.cpp:847–860  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

845
846#ifdef EXV_ENABLE_FILESYSTEM
847Image::UniquePtr ImageFactory::create(ImageType type, const std::string& path) {
848 auto fileIo = std::make_unique<FileIo>(path);
849 // Create or overwrite the file, then close it
850 if (fileIo->open("w+b") != 0) {
851 throw Error(ErrorCode::kerFileOpenFailed, path, "w+b", strError());
852 }
853 fileIo->close();
854
855 BasicIo::UniquePtr io(std::move(fileIo));
856 auto image = create(type, std::move(io));
857 if (!image)
858 throw Error(ErrorCode::kerUnsupportedImageType, static_cast<int>(type));
859 return image;
860}
861#endif
862
863Image::UniquePtr ImageFactory::create(ImageType type) {

Callers

nothing calls this directly

Calls 5

ErrorFunction · 0.85
strErrorFunction · 0.85
closeMethod · 0.80
findFunction · 0.50
openMethod · 0.45

Tested by

no test coverage detected