register_image_importer

menpo.io.register_image_importer(extension, callable)

Register a new importer for the given extension.

Parameters
  • ext_map ({‘str’ -> ‘callable’} dict) – Extensions map to callable.

  • extension (str) – File extension to support. May be multi-part e.g. ‘.tar.gz’

  • callable (callable) – The callable to invoke if a file with the provided extension is discovered during importing. Should take a single argument (the filepath) and any number of kwargs.