Michael Gronager's changes for supporting the in memory gz archiving.
This commit is contained in:
parent
247efc1635
commit
2db71d01cc
@ -105,6 +105,9 @@ Registry::Registry()
|
||||
addFileExtensionAlias("inta", "rgb");
|
||||
addFileExtensionAlias("bw", "rgb");
|
||||
|
||||
addFileExtensionAlias("ivz", "gz");
|
||||
addFileExtensionAlias("ozg", "gz");
|
||||
|
||||
#if defined(__DARWIN_OSX__)
|
||||
addFileExtensionAlias("jpg", "qt");
|
||||
addFileExtensionAlias("jpe", "qt");
|
||||
@ -1285,7 +1288,9 @@ ReaderWriter::ReadResult Registry::readImage(const std::string& fileName)
|
||||
ReaderWriter::ReadResult Registry::readImage(const std::string& fileName,bool useObjectCache)
|
||||
{
|
||||
std::string file = findDataFile( fileName );
|
||||
if (file.empty()) return ReaderWriter::ReadResult("Warning: file \""+fileName+"\" not found.");
|
||||
if (file.empty())
|
||||
file = fileName;
|
||||
// return ReaderWriter::ReadResult("Warning: file \""+fileName+"\" not found.");
|
||||
|
||||
if (useObjectCache)
|
||||
{
|
||||
@ -1308,6 +1313,8 @@ ReaderWriter::ReadResult Registry::readImage(const std::string& fileName,bool us
|
||||
notify(INFO)<<"Adding to cache image "<<file<<std::endl;
|
||||
addEntryToObjectCache(file,rr.getObject());
|
||||
}
|
||||
else
|
||||
return ReaderWriter::ReadResult("Warning: file \""+fileName+"\" not found.");
|
||||
|
||||
return rr;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user