package zimage
import "zgo.at/zstd/zimage"
Package zimage 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 ¶
doc.go sniff.go
- Version
- v0.0.0-20241125224656-49fafbb06ca9 (latest)
- Published
- Nov 25, 2024
- Platform
- linux/amd64
- Imports
- 2 packages
- Last checked
- 3 days ago –
Tools for package owners.