Switch to govips for native CGO image processing

- Replace gen2brain/avif, gen2brain/webp, disintegration/imaging with govips
- govips uses libvips via CGO for fast native image processing
- Add libheif-dev to Dockerfile for AVIF support
- Add docker-test Makefile target for running tests in Docker
- Update processor.go to use vips API for decode, resize, encode
- Add TestMain to initialize/shutdown vips in tests
- Remove WASM-based libraries (gen2brain) in favor of native codecs

Performance improvement: AVIF encoding now uses native libheif instead of
WASM, significantly reducing encoding time for large images.
This commit is contained in:
2026-01-08 15:16:34 -08:00
parent 4b2d85010e
commit 78f844fca5
6 changed files with 160 additions and 130 deletions

View File

@@ -7,6 +7,7 @@ ARG VERSION=dev
RUN apk add --no-cache \
build-base \
vips-dev \
libheif-dev \
pkgconfig
WORKDIR /src
@@ -27,6 +28,7 @@ FROM alpine:3.21
# Install runtime dependencies only
RUN apk add --no-cache \
vips \
libheif \
ca-certificates \
tzdata