Documentation ¶
Overview ¶
Package imageutil adds functions for working with images.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.