You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to add (and not insert) a small image into a larger one with some XY offset. What I have managed to do so far works as follows:
// Initialize a large image
Image largeImage = Image.Black(10000, 10000);
// Add a small image in the large image (this will be done multiple times)
Image smallImage = Image.Black(100, 100);
Image canvasForSmallImage = Image.Black(10000, 10000).Insert(smallImage, 500, 630);
// Add the canvas containing the small image to the large image
largeImage += canvasForSmallImage;
If we have to add a lot of small images, and we were to save the large image on the disk, I noticed that the process is very slow compared to just inserting the small images, so I'm assuming that libvips is adding the entire canvas to the entire large image, instead of adding only the small image (which makes sense). Is there a way to efficiently do this? (and without loading the entire large image in memory at once)
Thanks for your help
The text was updated successfully, but these errors were encountered:
Hi :)
I'm trying to add (and not insert) a small image into a larger one with some XY offset. What I have managed to do so far works as follows:
If we have to add a lot of small images, and we were to save the large image on the disk, I noticed that the process is very slow compared to just inserting the small images, so I'm assuming that libvips is adding the entire canvas to the entire large image, instead of adding only the small image (which makes sense). Is there a way to efficiently do this? (and without loading the entire large image in memory at once)
Thanks for your help
The text was updated successfully, but these errors were encountered: