Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error string
Error represents package level errors. Implements builtin.error interface.
const ( // ErrUnknownFormat means that format can't be determined. ErrUnknownFormat Error = "unknown format" )
type FileFormat ¶
type FileFormat string
FileFormat represents file format.
const ( JPEG FileFormat = "jpg" // PNG represents png image format. PNG FileFormat = "png" // BMP represents bmp image format. BMP FileFormat = "bmp" // GIF represents gif image format. GIF FileFormat = "gif" // AVIF represents avif image format. AVIF FileFormat = "avif" // WEBP represents webp image format. WEBP FileFormat = "webp" )
Enumeration of supported image formats.
func Format ¶
func Format(file *os.File) (FileFormat, error)
Format tries to determine image file format.
func FormatMust ¶
func FormatMust(file *os.File) FileFormat
FormatMust tries to determine image file format. In rare cases can panic if error occurs.
func (FileFormat) String ¶
func (f FileFormat) String() string
Click to show internal directories.
Click to hide internal directories.