package imageutil
import "github.com/teamwork/utils/imageutil"
Package imageutil adds functions for working with images.
Index ¶
Functions ¶
func DetectImage ¶
DetectImage detects the image type of the data.
It's a copy of http.DetectContentType with some unnecessary parts removed, making it about 10 times faster.
It returns an empty string if the image type can't be determined.
func DetectImageStream ¶
func DetectImageStream(fp io.ReadSeeker) (string, error)
DetectImageStream works like DetectImage, but operates on a file stream. It reads the minimal amount of data needed and Seek() back to where the offset was.
Source Files ¶
- Version
- v1.0.0 (latest)
- Published
- Mar 14, 2022
- Platform
- windows/amd64
- Imports
- 2 packages
- Last checked
- 1 hour ago –
Tools for package owners.