Methods:
encode(image, file, filename[, options]) Encode the given image to the given file. get_file_extensions() Return a list of accepted file extensions, e.g.
Encode the given image to the given file. filename provides a hint to the file format desired. options are encoder-specific, and unknown options should be ignored or issue warnings.
Return a list of accepted file extensions, e.g. [‘.png’, ‘.bmp’] Lower-case only.