提交 3e538355 编写于 作者: A Alexander Alekhin

highgui: force loading of imgcodecs module

- required for plugins on Linux (they use imwrite, but there is no link dependency)
上级 76e9da3f
...@@ -232,8 +232,12 @@ std::vector<FileSystemPath_t> getPluginCandidates(const std::string& baseName) ...@@ -232,8 +232,12 @@ std::vector<FileSystemPath_t> getPluginCandidates(const std::string& baseName)
return results; return results;
} }
// NB: require loading of imgcodecs module
static void* g_imwrite = (void*)imwrite;
void PluginUIBackendFactory::loadPlugin() void PluginUIBackendFactory::loadPlugin()
{ {
CV_Assert(g_imwrite);
for (const FileSystemPath_t& plugin : getPluginCandidates(baseName_)) for (const FileSystemPath_t& plugin : getPluginCandidates(baseName_))
{ {
auto lib = std::make_shared<cv::plugin::impl::DynamicLib>(plugin); auto lib = std::make_shared<cv::plugin::impl::DynamicLib>(plugin);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册