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 = oechem.OEGetFileExtension(filename)
if not oedepict.OEIsRegisteredImageFile(ext):
    oechem.OEThrow.Fatal("Unknown image type!")