code: func FormatFromExtension(ext string) (Format, error) {
  	if f, ok := formatExts[strings.ToLower(strings.TrimPrefix(ext, "."))]; ok {
  		return f, nil
  	}
  	return -1, ErrUnsupportedFormat
  }
docs: // FormatFromExtension parses image format from filename extension:
  // "jpg" (or "jpeg"), "png", "gif", "tif" (or "tiff") and "bmp" are supported.