OEIsRegisteredImageFile

bool OEIsRegisteredImageFile(const std::string &ext)

Returns whether or not an image file format is registered (i.e. supported) with the given extension. The following snippet of code demonstrates how to check whether a file name is a supported file format.

string filename(argv[1]);
string ext = OESystem::OEFileExtension(filename, "");
if (!OEIsRegisteredImageFile(ext))
  OEThrow.Fatal("Unknown image type!");