Files
pixa/internal
user dedc729f37
All checks were successful
check / check (push) Successful in 52s
refactor: extract magic byte detection into internal/magic package
Move MIMEType, DetectFormat, ValidateMagicBytes, PeekAndValidate,
IsSupportedMIMEType, MIMEToImageFormat, and ImageFormatToMIME from
internal/imgcache into a new internal/magic package.

The magic package defines its own ImageFormat type and constants to
avoid circular imports (imgcache imports magic for validation,
magic cannot import imgcache).

Update import sites in imgcache/service.go and service_test.go.

Part of issue #39.
2026-03-25 17:46:40 -07:00
..