package
Version:
v1.0.0
Opens a new window with list of versions in this module.
Published: Jan 18, 2026
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
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.
Format represents an image format.
const (
Unknown Format = iota
JPEG
PNG
GIF
WebP
AVIF
HEIF
TIFF
)
Supported image formats.
Detect identifies the image format from the given byte slice by examining
magic bytes. Returns Unknown if the format cannot be determined.
String returns a human-readable string representation of the format.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.