85 SGPath
p(SGPath::fromUtf8(path));
86 osg::ref_ptr<simgear::SGReaderWriterOptions> localReaderWriterOptions = simgear::SGReaderWriterOptions::copyOrCreate(osgDB::Registry::instance()->getOptions());
87 localReaderWriterOptions->setLoadOriginHint(simgear::SGReaderWriterOptions::LoadOriginHint::ORIGIN_CANVAS);
91 const SGPath valid_path = SGPath(
p).validate(
false);
92 if( !valid_path.isNull() )
93 return osgDB::readRefImageFile(valid_path.utf8Str(), localReaderWriterOptions);
95 SG_LOG(SG_IO, SG_ALERT,
"canvas::Image: reading '" << path <<
"' denied");
99 SGPath tpath =
globals->resolve_resource_path(path);
100 if( !tpath.isNull() )
101 return osgDB::readRefImageFile(tpath.utf8Str(), localReaderWriterOptions);
103 SG_LOG(SG_IO, SG_ALERT,
"canvas::Image: No such image: '" << path <<
"'");