Keep WebP, AVIF and JPEG XL encodes at the limits under 40 seconds (closes #272) #278

Open
clawbot wants to merge 2 commits from issue-272-encode-time-at-the-limits into next
2 Commits
Author SHA1 Message Date
sneak 47a2c2360a Keep WebP, AVIF and JPEG XL encodes at the limits under 40 seconds (closes #272)
check / check (push) Waiting to run
WebP is saved at effort 2 and JPEG XL at effort 4, and an AVIF output of
more than 16,777,216 pixels is refused with 400 before anything is
decoded, as AVIF is already at the lowest effort govips can set. With
one libvips thread, at any quality, 8192x8192 random pixels with an
alpha channel take up to about 23 seconds as WebP and 27 as JPEG XL, and
4096x4096, 8192x2048 or 2048x8192 up to about 34 as AVIF. Resizing with
fit=cover already decodes the input, so the output's dimensions are now
worked out before resizing, in outputDimensions. Reading the input moves
into readInput to keep Process within the linter's limits.

Model: opus-5-5
2026-10-15 22:47:20 +00:00
sneak 84a86274cd Test lower WebP and JPEG XL effort and the AVIF pixel limit
The WebP test now expects effort 2 instead of libvips' default of 4, a
new test expects JPEG XL at effort 4 instead of 7, and new tests expect an
AVIF output of more than 4096x4096 pixels to be refused before anything
is decoded and answered 400 on both image routes. They fail until the
settings and the refusal are in.

Model: opus-5-5
2026-10-15 22:41:24 +00:00