Coder Social home page Coder Social logo

Comments (3)

quentinmit avatar quentinmit commented on May 28, 2024 1

I don't know Rust at all so it might be quite difficult. It looks like I would need to change find_zoomlevel to find_zoomlevels and return a list of all zoom levels less than or equal to the desired zoom level, and then after a fetch of one zoom level finishes with one or more missing tiles, start over again with a new canvas at the next-smaller zoom level (optimally only downloading tiles that overlap with the missing tiles), then imageops::resize that up to the larger size, and then imageops::overlay the two canvases together. (And potentially, repeat this for the next-larger zoom level until all the gaps are filled.)

I think it's probably important to draw the next zoom level to a canvas instead of just trying to resize and clip a single tile, because resizing the tiles separately could produce artifacts at tile edges.

from dezoomify-rs.

lovasoa avatar lovasoa commented on May 28, 2024

This would indeed be very cool! Would you be interested in implementing that and making a pull request? I can provide help and guidance.

from dezoomify-rs.

lovasoa avatar lovasoa commented on May 28, 2024

Yes, all of these steps make sense.

Ideally we would break up the huge dezoomify function that currently drives the whole dezoomifying process. We could have a function that accepts a zoom level, a canvas, and the coordinates of the rectangle to fill, and call it repetitively : initially with a rectangle covering the whole image, then with the same canvas and only the missing rectangles, until we have no missing rectangles or no more zoom levels. This represents a consequent amount of work, but would also make it very easy to then implement seemingly unrelated features such as downloading only a small region of an image.

from dezoomify-rs.

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.