Is it possible to create a non-rectangular shape from a rectangular image? Or join rectangular images together at a slant?
Question about an existing feature
What are you trying to achieve?
I am trying to create a larger, rectangular image that is a composite of 5 images. The images appear as slanted parallelograms when they are joined together.
My initial thinking was to "extract" a parallelogram for each of the 5 and then join the 5 together. But I am not sure the best way to achieve this and if it's even possible with sharp.
When you searched for similar issues, what did you find that might be related?
I did not find anything that seemed related.
Please provide a minimal, standalone code sample, without other dependencies, that demonstrates this question
Not sure what to put here.
This is essentially the effect that I am trying to achieve, but starting with typical rectangular images for each individual
Hi, have you considered the use of SVG as a way of building such an image?
Would your recommendation to be turn each individual photo into an SVG and then combine them? Or am I missing something
On August 13, 2022, Cosma Damiano Trimboli @.***> wrote:
Hi, have you considered the use of SVG as a way of building such an image?
— Reply to this email directly, view it on GitHub https://github.com/lovell/sharp/issues/3329#issuecomment-1214246961, or unsubscribe <https://github.com/notifications/unsubscribe- auth/AUEC7J56R42DYTBPSQZ4RADVZAWZVANCNFSM56BLSGJA>. You are receiving this because you authored the thread.Message ID: @.***>
You should be able to do this in a single SVG file. Perhaps try embedding base64-encoded images and apply a clipPath containing the parallelogram shape to them.
<image xlink:href="data:image/jpeg;base64,..." clip-path="..." />
https://developer.mozilla.org/en-US/docs/Web/SVG/Element/clipPath
I hope this information helped. Please feel free to re-open with more details if further assistance is required.