Documentation ¶
Index ¶
- Variables
- func AllReadableExtensions() []string
- func AllWritableExtensions() []string
- func Distill(filePathOrURL string) string
- type Enum
- func (e Enum) CanRead() bool
- func (e Enum) CanWrite() bool
- func (e Enum) EnsureValid() Enum
- func (e Enum) Extension() string
- func (e Enum) Extensions() []string
- func (e Enum) Key() string
- func (e Enum) MarshalText() (text []byte, err error)
- func (e Enum) MimeType() string
- func (e Enum) MimeTypes() []string
- func (e Enum) String() string
- func (e Enum) UTI() string
- func (e *Enum) UnmarshalText(text []byte) error
Constants ¶
This section is empty.
Variables ¶
All possible values.
Functions ¶
func AllReadableExtensions ¶
func AllReadableExtensions() []string
AllReadableExtensions returns all file extensions that map to readable image formats.
func AllWritableExtensions ¶
func AllWritableExtensions() []string
AllWritableExtensions returns all file extensions that map to writable image formats.
Types ¶
type Enum ¶
type Enum byte
Enum holds the type of encoding an image was stored with.
func ForExtension ¶
ForExtension returns the image format for the given file extension.
func ForMimeType ¶
ForMimeType returns the image format for the given mime type.
func (Enum) EnsureValid ¶
EnsureValid ensures this is of a known value.
func (Enum) Extension ¶
Extension returns the primary extension for the format. An unknown format will return an empty string.
func (Enum) Extensions ¶
Extensions returns the list of valid file extensions for the format. An unknown format will return nil.
func (Enum) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface.
func (Enum) MimeType ¶
MimeType returns the primary mime type for the format. An unknown format will return an empty string.
func (Enum) MimeTypes ¶
MimeTypes returns the list of valid mime types for the format. An unknown format will return nil.
func (Enum) UTI ¶
UTI returns the uniform type identifier for the format. An unknown format will return an empty string.
func (*Enum) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface.