Giter VIP home page Giter VIP logo

Comments (3)

jcupitt avatar jcupitt commented on July 19, 2024

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:

  1. 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.

  2. 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.

EmilRosen avatar EmilRosen commented on July 19, 2024

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.

jcupitt avatar jcupitt commented on July 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.