Closed
Description
Consider:
$ more circle.svg
<svg viewBox="0 0 100 100"><circle cx="50" cy="50" r="30" fill="#000" /></svg>
$ more square.svg
<svg viewBox="0 0 100 100"><rect width="100" height="100" fill="#222" /></svg>
Then:
$ vips composite2 square.svg circle.svg x.png dest-in
$ vips extract_band x.png y.png 0 --n 3
Makes:
The sparkles disappear if you flatten the image rather than simply dropping the alpha, but they look untidy.
In dest-in
we are swapping the alpha on a premultiplied image. Instead, we need to unpremultiply, swap, and re-premultiply. Some other blend modes need a similar change.