Files
pixa/internal/imageprocessor/imageprocessor_test.go
clawbot d7e1cfaa24
All checks were successful
check / check (push) Successful in 58s
refactor: extract imageprocessor into its own package
Move ImageProcessor, Params, New(), DefaultMaxInputBytes, ErrInputDataTooLarge,
and related types from internal/imgcache/ into a new standalone package
internal/imageprocessor/.

The imageprocessor package defines its own Format, FitMode, Size, Request, and
Result types, making it fully independent with no imports from imgcache. The
imgcache service converts between its own types and imageprocessor types at the
boundary.

Changes:
- New package: internal/imageprocessor/ with imageprocessor.go and tests
- Removed: processor.go and processor_test.go from internal/imgcache/
- Removed: Processor interface and ProcessResult from imgcache.go (now unused)
- Updated: service.go uses *imageprocessor.ImageProcessor directly
- Copied: testdata/red.avif for AVIF decode test

Addresses review feedback on PR #37: image processing is a distinct concern
from the HTTP service layer and belongs in its own package.
2026-03-17 20:32:20 -07:00

13 KiB