From c32585a046f73ec9ab32ef411cd58d21dd4239f7 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sat, 14 Dec 2002 06:42:56 +0000 Subject: [PATCH] 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. --- src/osgPlugins/gif/ReaderWriterGIF.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/osgPlugins/gif/ReaderWriterGIF.cpp b/src/osgPlugins/gif/ReaderWriterGIF.cpp index 412ba0d44..18b1595bc 100644 --- a/src/osgPlugins/gif/ReaderWriterGIF.cpp +++ b/src/osgPlugins/gif/ReaderWriterGIF.cpp @@ -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;