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

Merged
clawbot merged 2 commits from issue-272-encode-time-at-the-limits into next 2026-10-20 15:19:08 +02:00
2 Commits
Author SHA1 Message Date
sneak 8213f99f67 Keep WebP, AVIF and JPEG XL encodes at the limits under 40 seconds (closes #272)
check / check (push) Canceled after 0s
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-20 13:05:13 +00:00
sneak 24f937bf3e 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, at a requested size or at the
source's own, 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-20 13:05:13 +00:00