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[0];
String ext = OEChem.OEGetFileExtension(filename);
if (!OEDepict.OEIsRegisteredImageFile(ext))
    OEChem.OEThrow.Fatal("Unknown image type!");