Install libvips JPEG XL support and require it at startup (part of #222)
check / check (push) Waiting to run

script/bootstrap --cgo installs vips-jxl on Alpine, where libvips' JPEG
XL loader and saver are a package of their own; the nix and brew
libvips include them, as does apt's from Debian 12 and Ubuntu 24.04 on.
The runtime stage of the Dockerfile installs vips-jxl too.

imageprocessor.New now returns an error when libvips cannot load and
save JPEG XL, and NewService passes it on, so pixad does not start
without that support. JPEG XL becomes the default output later in the
issue, which a pixad without it could not serve. A new test saves an
image as JPEG XL with govips and loads it back.

Model: opus-5-5
This commit is contained in:
2026-10-08 01:06:54 +00:00
parent 15d95436a5
commit 0969cf43bb
9 changed files with 210 additions and 47 deletions
@@ -60,9 +60,15 @@ func TestService_Get_WaitsForSlotBeforeReadingCachedSource(t *testing.T) {
t.Parallel()
svc, fixtures := SetupTestService(t)
svc.processor = imageprocessor.New(
processor, err := imageprocessor.New(
imageprocessor.Params{MaxConcurrentProcessing: 1},
)
if err != nil {
t.Fatalf("imageprocessor.New() error = %v", err)
}
svc.processor = processor
// A first request caches the photo as a source.
resp, err := svc.Get(t.Context(), widthOnlyRequest(fixtures, 50))