Exemple #1
0
osg::ref_ptr<osg::Image> osgDB::readRefImageFile(const std::string& filename,const Options* options)
{
    ReaderWriter::ReadResult rr = Registry::instance()->readImage(filename,options);
    if (rr.validImage()) return osg::ref_ptr<osg::Image>(rr.getImage());
    if (rr.error()) OSG_WARN << rr.message() << std::endl;
    return NULL;
}
Exemple #2
0
Image* osgDB::readImageFile(const std::string& filename,const ReaderWriter::Options* options)
{
    ReaderWriter::ReadResult rr = Registry::instance()->readImage(filename,options);
    if (rr.validImage()) return rr.takeImage();
    if (rr.error()) notify(WARN) << rr.message() << std::endl;
    return NULL;
}