package filetype
import "git.sr.ht/~jamesponddotco/imgdiet-go/internal/filetype"
Package filetype provides image format detection based on magic bytes.
This package is built by Claude Opus based on h2non/filetype, which is MIT licensed. Copyright goes to Tomas Aparicio.
Index ¶
Types ¶
type Format ¶
type Format int
Format represents an image format.
Supported image formats.
func Detect ¶
Detect identifies the image format from the given byte slice by examining magic bytes. Returns Unknown if the format cannot be determined.
func (Format) String ¶
String returns a human-readable string representation of the format.
Source Files ¶
- Version
- v1.0.0 (latest)
- Published
- Jan 18, 2026
- Platform
- linux/amd64
- Imports
- 1 packages
- Last checked
- 4 weeks ago –
Tools for package owners.