Comments (3)
Hello Emil,
The problem is that on Windows you can't have more than 2048 files open at once, unfortunately. I think you have two choices:
-
Build your image as a series of passes. You could make your 90k x 40k image and paste 2000 images in, then save the output. Next, close Python, restart it (to make certain all 2000 files have been closed), load the image back, and paste another 2000 in. Once all 7000 are there, save in your output format. I would use vips images (.v) for the intermediates: it's a very fast format which can be loaded on demand.
-
Install linux in a VM and build the image there. I've built 30,000 image mosaics without issue.
There can also be issues with C stack overflow. libvips uses a recursive algorithm to work out which pixels to calculate next, and for very long pipelines this can overflow and cause a crash. Again, processing in chunks of 2000 at once should fix this.
from pyvips.
I tried writing in chunks and it works. Thanks! However, I would like to add some notes:
- I did not need to restart python between writing chunks.
- I had to use a chunk size of 500. If I used a larger chunk size, the first chunk would successfully be written but the program would exit soon after.
- Apparently I had a max of 512 open files. Changing it to 2048 did not allow me to increase the chunk size.
from pyvips.
I'm puzzled by your 512 limit, libvips is supposed to raise it for you. Anyway, I'm glad you got it working.
from pyvips.
Related Issues (20)
- Memory leaking with pdf HOT 21
- dzsave_target returns NoneType not list[] as in docs HOT 1
- Pyvips fetch returns bad image on .svs files HOT 4
- Reading in image a second time breaks on qptiff file HOT 6
- Documentation link to conda package HOT 1
- Create svs file with image pyramid, label and macro in pyvips? HOT 4
- Image merge stitch HOT 2
- `addalpha` has different behaviour compared to C HOT 1
- Error installing pyvips on Mac OS HOT 15
- draw_rect fill error HOT 2
- creating tiles of 16bit multiband (4 band) tiff image leaves black canvas HOT 4
- class "jxlsave" not found HOT 9
- Assertion failed: sp->cinfo.comm.is_decompressor HOT 3
- Help installing pyvips for jupyter HOT 5
- `TIFFFillTile: Read error` when writing a TIFF file on a per-tile basis. HOT 2
- Thumbnail creation taking too long HOT 2
- Unable to save images when certain combinations of them are resize()'d HOT 7
- pyvips stats HOT 1
- How does composite() merge colors? HOT 8
- ICC profiles from file stream in pyvips HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyvips.