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!");