code: def ext(self):
          
          ext_map = {
              'BMP': 'bmp', 'GIF': 'gif', 'JPEG': 'jpg', 'PNG': 'png',
              'TIFF': 'tiff', 'WMF': 'wmf'
          }
          format = self._format
          if format not in ext_map:
              tmpl = "unsupported image format, expected one of: %s, got '%s'"
              raise ValueError(tmpl % (ext_map.keys(), format))
          return ext_map[format]
docs: Canonical file extension for this image e.g. ``'png'``. The returned
          extension is all lowercase and is the canonical extension for the
          content type of this image, regardless of what extension may have
          been used in its filename, if any.