Refuse a fit=outside size whose output exceeds the maximum (closes #257) #259

Merged
clawbot merged 2 commits from issue-257-bound-fit-outside into next 2026-10-13 10:44:46 +02:00
2 Commits
Author SHA1 Message Date
clawbot cdb9c02aaa Refuse a fit=outside size whose output exceeds the maximum (closes #257)
check / check (push) Waiting to run
fit=outside scales the source to cover the requested size, and the side
scaled past it was held to no maximum: 1x8192?fit=outside of a 3000x600
source was resized to 40960x8192 and encoded. resize now refuses such an
output with ErrOutputTooLarge before resizing, so both image routes answer
it 400 with the error a size with one side 0 already gets. The other fit
modes make the requested size or one within it. README.md and TODO.md
say so.

Model: opus-5-5
2026-10-13 08:02:05 +00:00
clawbot 4c82948e19 Test that fit=outside is refused when its output exceeds the maximum
fit=outside scales the source to cover the requested size, and the side
that comes out past it is held to no maximum: 1x8192?fit=outside of a
3000x600 source makes a 40960x8192 output. The new tests expect such a
size to be refused with ErrOutputTooLarge, answered 400 on both image
routes, for the width and for the height, and a fit=outside output of at
most 8192 on each side to be made as before.

Model: opus-5-5
2026-10-13 08:02:05 +00:00