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.

filename = sys.argv[1]
ext = OEGetFileExtension(filename)
if not OEIsRegisteredImageFile(ext):
    OEThrow.Fatal("Unknown image type!")