Skip to content

reject join.across and join.shim for animated joins - #4634

Merged
lovell merged 1 commit into
lovell:mainfrom
metsw24-max:join-animated-validate
Oct 15, 2026
Merged

lovell merged 1 commit into
lovell:mainfrom
metsw24-max:join-animated-validate

Conversation

@metsw24-max

Copy link
Copy Markdown
Contributor

Corrupt animation when join.animated is combined with across or shim

The animated join sets the output page height to the joined height divided by the image count, which only holds for a vertical strip with no spacing. sharp([a, b], { join: { animated: true, across: 2 } }).gif() produces frames that are horizontal slices of the side-by-side pair, and a non-zero shim bakes the spacer rows into every frame so the content drifts. When the division is not exact the page height written to the file is invalid and the output silently loses its animation.

These combinations now fail input validation with a clear error; a plain animated join is unchanged. Regression tests added to test/unit/join.js.

@lovell
lovell merged commit adae0a0 into lovell:main Oct 15, 2026
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants