Added a check for extension of a filename to the gif loader, since it looks

like the isn't reconginizing rgb files as not being gif.
This commit is contained in:
Robert Osfield
2002-12-14 06:42:56 +00:00
parent a8ce4e9c0d
commit c32585a046

View File

@@ -326,6 +326,9 @@ class ReaderWriterGIF : public osgDB::ReaderWriter
virtual ReadResult readImage(const std::string& fileName, const osgDB::ReaderWriter::Options*)
{
std::string ext = osgDB::getFileExtension(fileName);
if (!acceptsExtension(ext)) return ReadResult::FILE_NOT_HANDLED;
unsigned char *imageData = NULL;
int width_ret;
int height_ret;