Documentation
¶
Index ¶
- func GetImageConfig(pth string) (image.Config, string, error)
- func GetImageFromFile(pth string) (image.Image, string, error)
- func IsImage(filename string) bool
- func IsImageExt(ext string) bool
- func MimeFromIncipit(b []byte) string
- func WriteImageToBytes(img image.Image, format string) ([]byte, error)
- func WriteImageToFile(img image.Image, format, pth string, mode os.FileMode) error
- type ImageInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsImage ¶
IsImage checks the file's extention to determine whether the file is an image type. TODO: Add FileType() by checking the file content instead just extension. IsImage() is just one case of it.
func IsImageExt ¶
IsImageExt checks the file's extention to determine whether the file is an image type.
func MimeFromIncipit ¶
mimeFromIncipit returns the mime type of an image file from its first few bytes or the empty string if the file does not look like a known file type
Types ¶
Click to show internal directories.
Click to hide internal directories.