Skip to content

Commit

Permalink
Fix Animated Circles
Browse files Browse the repository at this point in the history
I wish I could add more information about why "northeast" and "tile" are required, but without them, you can't circle-crop an animated webp.
Also simplified the mask SVG.
  • Loading branch information
Helvio88 committed Jan 25, 2023
1 parent cf397b8 commit 2744bc4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/internal/convert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ const convert = async (
}).composite([
{
input: Buffer.from(
`<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><circle cx="256" cy="256" r="256" fill="${background}"/></svg>`
`<svg><circle cx="256" cy="256" r="256" fill="${background}"/></svg>`
),
blend: 'dest-in'
blend: 'dest-in',
gravity: 'northeast',
tile: true
}
])
}
Expand Down

0 comments on commit 2744bc4

Please sign in to comment.