MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ create_writer()

std::unique_ptr< ImageWriter > MayaFlux::IO::ImageWriterRegistry::create_writer ( const std::string &  filepath) const
inline

Definition at line 97 of file ImageWriter.hpp.

98 {
99 auto ext = std::filesystem::path(filepath).extension().string();
100 if (!ext.empty() && ext[0] == '.') {
101 ext = ext.substr(1);
102 }
103
104 auto it = m_factories.find(ext);
105 if (it != m_factories.end()) {
106 return it->second();
107 }
108 return nullptr;
109 }
std::unordered_map< std::string, ImageWriterFactory > m_factories

Referenced by MayaFlux::Nexus::StateEncoder::encode(), MayaFlux::IO::save_image(), MayaFlux::IO::IOManager::save_image(), and MayaFlux::IO::IOManager::save_image().

+ Here is the caller graph for this function: