コード例 #1
0
void ossimImageHandlerFactory::getImageHandlersByMimeType(ossimImageHandlerFactoryBase::ImageHandlerList& result, const ossimString& mimeType)const
{
   ossimString test(mimeType.begin(), mimeType.begin()+6);
   if(test == "image/")
   {
      ossimString mimeTypeTest(mimeType.begin() + 6, mimeType.end());
      getImageHandlersBySuffix(result, mimeTypeTest);
      if(mimeTypeTest == "dted")
      {
         result.push_back(new ossimDtedTileSource);
      }
   }
}
コード例 #2
0
ossimRefPtr<ossimImageHandler> ossimImageHandlerRegistry::openBySuffix(const ossimFilename& file,
                                                                       bool openOverview)const
{
   std::vector<ossimRefPtr<ossimImageHandler> > handlers;
   
   getImageHandlersBySuffix(handlers, file.ext());
   ossim_uint32 idx = 0;
   ossim_uint32 size = (ossim_uint32) handlers.size();
   
   for(idx = 0; idx < size; ++idx)
   {
      handlers[idx]->setOpenOverviewFlag(openOverview);
      if(handlers[idx]->open(file))
      {
         return handlers[idx];
      }
   }
   
   return ossimRefPtr<ossimImageHandler>(0);
}