-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to use vips_arrayjoin from sharp? #1580
Comments
Hello, this isn't supported at the moment, but could make a future possible enhancement. I recommend spawning a The general use case for image stitching suggests this could be exposed via a utility function that would provide a "join" operation/pipeline only so e.g. no resizing at the same time. 👇 PROPOSED API, NOT YET IMPLEMENTED OR AVAILABLE sharp
.join([
[image1, image2],
[image3, image4]
], {
background: '#fff',
halign: 'centre',
shim: 10,
animated: true,
})
.toBuffer()
.then( ... ) ☝️ PROPOSED API, NOT YET IMPLEMENTED OR AVAILABLE ...where |
Is there a way to use the bundled libvips from the child process? #1175 (comment) |
for .join() would it be possible to pass a 2d array that gets split up if there’s a across parameter. I think vips_arrayjoin() already has an across parameter |
Only shared libraries are included, no executable files. |
How do you use a child process
images is |
I think you need to specify |
@lovell Is this still planned? Would be very useful! |
@willemmulder PRs are always welcome, if you're able. |
@lovell Not just yet, unfortunately. I'm just getting started, and looking for a way to stitch together a bunch of smaller images. I previously implemented things in jimp but now started to look into Sharp because jimp was so memory-hungry (using >2GB for stitching 196 small images). |
@lovell Is there a way in Sharp to make raw calls to libvips? So I could call the arrayjoin function through Sharp? |
请问一下,多张图片合成一张gif或webp动图这个功能支持的进度怎么样了? @lovell |
For those who haven't yet rolled their own |
Maybe this const image = sharp([
[image1, image2],
[image3, image4]
], {
join: {
background: '#fff',
halign: 'centre',
shim: 10
},
raw: {
width: 128,
height: 128,
channels: 3
}
}).resize(256).png().toFile(filename); I tried for hours to get the best solution (combining a 4x4 grid and resizing) and anything based on I might try to fork it and hack together something that works for my usecase, but my c++ is rusty and i doubt that i can make a good contribution. |
I don't know if it fits here but I am interested in it. Joining several frames as a gif :) |
I like the API offered here: https://github.com/ccpu/join-images#readme Except using this |
But the join-images module supports only single page files/images merge (stitches the images), but If I use it for multipage tiff files merge, it didn't work. It would be great if we could get native sharp API to merge multi-page tiff files (each file can have multiple pages) into a single file. |
The https://github.com/ccpu/join-images repo is deprecated these days. Is there any update on this feature in sharp natively? Thanks :-) |
I would like to create an image from an array of image buffers with x number of images per row.
The text was updated successfully, but these errors were encountered: