Added extension checking to the rgb and bmp write of images.
This commit is contained in:
@@ -366,6 +366,9 @@ class ReaderWriterRGB : public osgDB::ReaderWriter
|
||||
|
||||
virtual WriteResult writeImage(const osg::Image &img,const std::string& fileName, const osgDB::ReaderWriter::Options*)
|
||||
{
|
||||
std::string ext = osgDB::getFileExtension(fileName);
|
||||
if (!acceptsExtension(ext)) return WriteResult::FILE_NOT_HANDLED;
|
||||
|
||||
FILE *fp = fopen(fileName.c_str(), "wb");
|
||||
if (!fp) return WriteResult::ERROR_IN_WRITING_FILE;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user